|
|
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 - metrics - downloadIndex: B T
Length: 1576 (0x628)
Types: TextFile
Names: »B«
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
└─⟦d65440be7⟧ »DATA«
└─⟦this⟧
with Text_Io;
with Lex, Token, String_Utile;
with Syntaxe;
use Text_Io;
procedure Testsyntaxe is
T_Token : Token.Object;
Ptr_File : Text_Io.File_Type;
Var : Character;
Nom_Du_Fichier : String_Utile.Pstring;
begin
Put_Line ("entrer votre nom de fichier :");
while not End_Of_Line loop
Get (Var);
String_Utile.Buildstring (Var);
end loop;
Nom_Du_Fichier := String_Utile.Givestring;
Create (Ptr_File, Out_File, Nom_Du_Fichier.all);
Put_Line ("Donner des caracteres, terminer par $ :");
Var := Ascii.Nul;
while Var /= '$' loop
Get (Var);
Put (Ptr_File, Var);
if End_Of_Line then
Put (Ptr_File, Ascii.Cr);
end if;
end loop;
Reset (Ptr_File, In_File);
Lex.Lexopen (Ptr_File);
while not Lex.Lexatend (Ptr_File) loop
Lex.Lexnexttoken (Ptr_File);
T_Token := Lex.Lexgettoken;
Text_Io.Put (Token.Object'Image (T_Token));
if Token.Object'Pos (T_Token) = Token.Object'Pos (Token.L_Id) or
Token.Object'Pos (T_Token) = Token.Object'Pos (Token.L_Int) then
Text_Io.Put_Line (" => " & Lex.Lexgetvalue);
else
Text_Io.New_Line;
end if;
end loop;
Reset (Ptr_File, In_File);
Lex.Lexopen (Ptr_File);
if not Lex.Lexatend (Ptr_File) then
if Syntaxe.Parse (Ptr_File) then
Text_Io.Put_Line ("Le traitement est OK");
else
Text_Io.Put_Line ("Erreur dans l'expression !!");
end if;
end if;
Close (Ptr_File);
end Testsyntaxe;