|
|
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: 4136 (0x1028)
Types: TextFile
Names: »B«
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
└─⟦129cab021⟧ »DATA«
└─⟦this⟧
with Lex, Error, Debug;
with Value, Primitives_List, Primitives, Body_Description, Description_List;
package body Action is
procedure Parse (N : in out Binary_Tree.Node; Success : in out Boolean) is
N1 : Binary_Tree.Node;
Ok : Boolean := True;
begin
N1 := new Binary_Tree.Node_Structure;
case Lex.Get is
when Lex.Attendre =>
N1.The_Type := Binary_Tree.Attendre_Type;
Lex.Next;
Value.Parse (N1.Right_Son, Ok);
Success := Ok;
when Lex.Pour =>
N1.The_Type := Binary_Tree.Pour_Type;
Lex.Next;
if Lex.Current_Token_Is (Lex.Identifier) then
N1.S := new String'(Lex.Image);
Lex.Next;
if Lex.Current_Token_Is (Lex.Faire) then
Debug.Put (293);
Lex.Next;
if Lex.Current_Token_Is (Lex.Begin_Bracket) then
Debug.Put (294);
Lex.Next;
Primitives_List.Parse (N1.Right_Son, Ok);
Success := Ok and Success;
if Lex.Current_Token_Is (Lex.End_Bracket) then
Debug.Put (295);
Lex.Next;
else
Error.Append (16);
Success := False;
end if;
else
Error.Append (17);
Success := False;
end if;
else
Primitives.Parse (N1.Right_Son, Ok);
Success := Ok and Success;
end if;
end if;
when Lex.Puis =>
N1.The_Type := Binary_Tree.Puis_Type;
Debug.Put (297);
Lex.Next;
Body_Description.Parse (N1.Right_Son, Ok);
Success := Ok;
when Lex.Au =>
N1.The_Type := Binary_Tree.Autemps_Type;
Debug.Put (2971);
Lex.Next;
if Lex.Current_Token_Is (Lex.Temps) then
Debug.Put (298);
Lex.Next;
Value.Parse (N1.Left_Son, Ok);
Success := Ok;
if Lex.Current_Token_Is (Lex.Faire) then
Debug.Put (299);
Lex.Next;
Body_Description.Parse (N1.Right_Son, Ok);
Success := Ok and Success;
else
Error.Append (18);
Success := False;
end if;
else
Error.Append (19);
Success := False;
end if;
when others =>
Error.Append (20);
Success := False;
end case;
N := N1;
end Parse;
procedure Generate (N : Binary_Tree.Node; T : in out Natural) is
Value1 : Natural;
begin
case N.The_Type is
when Binary_Tree.Attendre_Type =>
Value.Generate (N.Right_Son, Value1);
T := T + Value1;
when Binary_Tree.Pour_Type =>
if Binary_Tree."=" (N.Right_Son.The_Type,
Binary_Tree.L_Primitives_Type) then
Primitives_List.Generate (N.Right_Son, T, N.S.all);
else
Primitives.Generate (N.Right_Son, T, N.S.all);
end if;
when Binary_Tree.Puis_Type =>
Body_Description.Generate (N.Right_Son, T);
when Binary_Tree.Autemps_Type =>
Value.Generate (N.Left_Son, Value1);
Body_Description.Generate (N.Right_Son, Value1);
when others =>
null;
end case;
end Generate;
end Action;