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: 2133 (0x855) Types: TextFile Names: »B«
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11 └─ ⟦129cab021⟧ »DATA« └─⟦this⟧
with More_Unary; with Msg_Report; with Object; with Primary; with Scanner; package body Unary is type Node_Structure is record Info : Natural range 0 .. 1 := 0; Prim : Primary.Node := Primary.Empty_Node; Moun : More_Unary.Node := More_Unary.Empty_Node; Lign : Integer; end record; procedure Parse (N : in out Node; Error : out Boolean) is Failed : Boolean := False; begin Msg_Report.Information ("I enter in unary's parse"); N := new Node_Structure; N.Lign := Scanner.Line_Number; Primary.Parse (N.Prim, Failed); if not Failed then if More_Unary.Is_First (Scanner.Symbol) then N.Info := 1; More_Unary.Parse (N.Moun, Failed); end if; end if; Msg_Report.Information ("I leave unary's parse with failed = " & Boolean'Image (Failed)); Error := Failed; end Parse; procedure Unparse (N : Node) is begin Primary.Unparse (N.Prim); if N.Info = 1 then More_Unary.Unparse (N.Moun); end if; end Unparse; function Is_First (T : Scanner.Token) return Boolean is use Scanner; begin return Primary.Is_First (T); end Is_First; function Interpret (N : Node; Inherited : Object.Reference := Object.Void_Reference) return Object.Reference is Result : Object.Reference; begin Msg_Report.Information ("I enter in unary's interpret"); Msg_Report.Set_Line_Number (N.Lign); Result := Primary.Interpret (N.Prim); if N.Info = 1 then Result := More_Unary.Interpret (N.Moun, Result); end if; Msg_Report.Information ("I leave unary's interpret with result :"); Msg_Report.Continue ("class = " & Object.Class'Image (Object.The_Class (Result)) & " ident = " & Integer'Image (Object.Identificator (Result))); return Result; end Interpret; end Unary;