1-- EDIF utils. 2-- Copyright (C) 2019 Tristan Gingold 3-- 4-- This program is free software: you can redistribute it and/or modify 5-- it under the terms of the GNU General Public License as published by 6-- the Free Software Foundation, either version 2 of the License, or 7-- (at your option) any later version. 8-- 9-- This program is distributed in the hope that it will be useful, 10-- but WITHOUT ANY WARRANTY; without even the implied warranty of 11-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12-- GNU General Public License for more details. 13-- 14-- You should have received a copy of the GNU General Public License 15-- along with this program. If not, see <gnu.org/licenses>. 16 17package body Edif.Nutils is 18 procedure Init_Constr (Constr : out Constr_Type) is 19 begin 20 Constr := (Null_Node, Null_Node); 21 end Init_Constr; 22 23 procedure Append_Node (Constr : in out Constr_Type; N : Node) is 24 begin 25 if Constr.First = Null_Node then 26 Constr.First := N; 27 else 28 Set_Chain (Constr.Last, N); 29 end if; 30 Constr.Last := N; 31 end Append_Node; 32 33 function Get_Constr_Chain (Constr : Constr_Type) return Node is 34 begin 35 return Constr.First; 36 end Get_Constr_Chain; 37end Edif.Nutils; 38