|
|
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: 4343 (0x10f7)
Types: TextFile
Names: »B«
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
└─⟦129cab021⟧ »DATA«
└─⟦this⟧
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
└─⟦d65440be7⟧ »DATA«
└─⟦this⟧
with Text_Io;
with Pile_Lex;
use Pile_Lex;
with Les_Types;
use Les_Types;
with Label;
with Reprise_Arriere;
use Reprise_Arriere;
package body Flot_Controle is
subtype Texpr_Bool is Reprise_Arriere.Attribut (Reprise_Arriere.Expr_Bool);
subtype Tinstr_Autre is Reprise_Arriere.Attribut
(Reprise_Arriere.Instr_Autre);
procedure Parse_Expr_Bool (Afile : Text_Io.File_Type;
Expr : in out Texpr_Bool) is
begin
while Lex_Get_Token /= L_Alors and Lex_Get_Token /= L_Debut loop
Lex_Next_Token (Afile);
end loop;
Expr.V := Label.Creer (0);
Expr.F := Label.Creer (0);
end Parse_Expr_Bool;
procedure Parse_Instr_Ra (Afile : Text_Io.File_Type;
Instr : in out Tinstr_Autre) is
Label_Get1, Label_Get2, Label_Get3, Label_Get4 : Natural;
Expr : Texpr_Bool;
Instr_T, Instr_F, Liste : Tinstr_Autre;
begin
case Lex_Get_Token is
when L_Debut =>
Lex_Next_Token (Afile);
while Lex_Get_Token /= L_Fin loop
Parse_Instr_Ra (Afile, Liste);
Liste.Ls := null;
end loop;
Lex_Next_Token (Afile);
Instr.Ls := Label.Creer (0);
when L_Si =>
Lex_Next_Token (Afile);
Parse_Expr_Bool (Afile, Expr);
Pile_Lex.Prg_Lire_Posi_Iterateur (Label_Get1);
if Lex_Get_Token = L_Alors then
Lex_Next_Token (Afile);
Parse_Instr_Ra (Afile, Instr_T);
Pile_Lex.Prg_Lire_Posi_Iterateur (Label_Get2);
if Lex_Get_Token = L_Sinon then
Lex_Next_Token (Afile);
Pile_Lex.Prg_Lire_Posi_Iterateur (Label_Get3);
Parse_Instr_Ra (Afile, Instr_F);
Pile_Lex.Prg_Lire_Posi_Iterateur (Label_Get4);
Label.Reprendre (Expr.V, Label_Get1);
Label.Reprendre (Expr.F, Label_Get3);
Instr.Ls := Label.Fusion (Instr_T.Ls, Instr_F.Ls);
Label.Reprendre (Instr.Ls, Label_Get4 - 1);
Gen_Write (Expr.F, Label_Get1);
Gen_Write (Instr_T.Ls, Label_Get2);
Gen_Write (Instr_F.Ls, Label_Get4);
end if;
end if;
when L_Tant =>
Pile_Lex.Prg_Lire_Posi_Iterateur (Label_Get1);
Lex_Next_Token (Afile);
if Lex_Get_Token = L_Que then
Lex_Next_Token (Afile);
Parse_Expr_Bool (Afile, Expr);
Pile_Lex.Prg_Lire_Posi_Iterateur (Label_Get2);
Parse_Instr_Ra (Afile, Instr_T);
Pile_Lex.Prg_Lire_Posi_Iterateur (Label_Get3);
Label.Reprendre (Instr_T.Ls, Label_Get1);
Label.Reprendre (Expr.F, Label_Get3);
Instr.Ls := Expr.F;
Gen_Write (Expr.F, Label_Get2);
Gen_Write (Instr_T.Ls, Label_Get3);
end if;
when others =>
Lex_Next_Token (Afile);
while Lex_Get_Token /= L_Separ loop
Lex_Next_Token (Afile);
end loop;
Lex_Next_Token (Afile);
Instr.Ls := Label.Creer (0);
end case;
end Parse_Instr_Ra;
procedure Reprise_Arriere_Sur_Blocs (Afile : Text_Io.File_Type) is
Instr : Tinstr_Autre;
begin
while (Lex_Get_Token /= L_Representation) loop
Lex_Next_Token (Afile);
if Lex_Get_Token = L_Debut then
Parse_Instr_Ra (Afile, Instr);
end if;
end loop;
end Reprise_Arriere_Sur_Blocs;
procedure Reprendre_En_Arriere (Afile : Text_Io.File_Type) is
begin
Pile_Lex.Prg_Iterateur_A_Position (2);
Lex_Next_Token (Afile);
Reprise_Arriere_Sur_Blocs (Afile);
Pile_Lex.Prg_Iterateur_A_Position (0);
Lex_Next_Token (Afile);
end Reprendre_En_Arriere;
end Flot_Controle;