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 - downloadIndex: ┃ B T ┃
Length: 1819 (0x71b) Types: TextFile Names: »B«
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11 └─ ⟦129cab021⟧ »DATA« └─⟦this⟧
with Lex, Error, Debug, Symbol; with Expression, Value; package body Factor is procedure Parse (N : in out Binary_Tree.Node; Success : in out Boolean) is N1 : Binary_Tree.Node; Ok : Boolean := True; begin Success := True; N1 := new Binary_Tree.Node_Structure; case Lex.Get is when Lex.Open_Bracket => N1.The_Type := Binary_Tree.Expression_Type; Debug.Put (510); Lex.Next; Expression.Parse (N1.Right_Son, Ok); Success := Success and Ok; if Lex.Current_Token_Is (Lex.Close_Bracket) then Debug.Put (511); Lex.Next; else Error.Append (3); Success := False; end if; when Lex.Identifier | Lex.Int | Lex.Temps => Value.Parse (N1.Right_Son, Ok); Success := Success and Ok; when others => Error.Append (55); Success := False; end case; N := N1; end Parse; procedure Generate (N : in out Binary_Tree.Node; The_Value : in out Natural) is Value1 : Natural; begin Debug.Put (5); case N.The_Type is when Binary_Tree.Null_Type => Generate (N.Right_Son, Value1); when Binary_Tree.Expression_Type => Expression.Generate (N.Right_Son, Value1); The_Value := Value1; when Binary_Tree.Valeur_Type => Value.Generate (N, Value1); The_Value := Value1; when others => Value1 := 0; end case; The_Value := Value1; end Generate; end Factor;