|
|
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: 1712 (0x6b0)
Types: TextFile
Names: »B«
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
└─⟦129cab021⟧ »DATA«
└─⟦this⟧
with Lex, Error, Symbol, Debug, Binary_Tree;
with Condition, Description_List, Sinon_Struct;
package body If_Struct is
procedure Parse (N : in out Binary_Tree.Node; Success : in out Boolean) is
N1, N2 : Binary_Tree.Node;
Ok : Boolean := True;
begin
Success := True;
if Lex.Current_Token_Is (Lex.Si) then
N1 := new Binary_Tree.Node_Structure;
N2 := new Binary_Tree.Node_Structure;
N1.The_Type := Binary_Tree.Si_Type;
Lex.Next;
Condition.Parse (N1.Left_Son, Ok);
N1.Right_Son := N2;
if Lex.Current_Token_Is (Lex.Alors) then
Lex.Next;
Description_List.Parse (N2.Left_Son, Ok);
Success := Success and Ok;
Sinon_Struct.Parse (N2.Right_Son, Ok);
Success := Success and Ok;
if Lex.Current_Token_Is (Lex.Fin) then
Lex.Next;
if Lex.Current_Token_Is (Lex.Si) then
Lex.Next;
else
Error.Append (32);
Success := False;
end if;
else
Error.Append (33);
Success := False;
end if;
end if;
N := N1;
end if;
end Parse;
procedure Generate (N : Binary_Tree.Node; T : in out Natural) is
begin
if Condition.Generate (N.Left_Son) then
Description_List.Generate (N.Right_Son.Left_Son, T);
else
Sinon_Struct.Generate (N.Right_Son.Right_Son, T);
end if;
end Generate;
end If_Struct;