diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-05-09 08:03:29 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-05-09 08:03:29 +0200 |
commit | f526c1f41a2f5a8a5f70ee33f82d9e6b84117142 (patch) | |
tree | ab95ed6b030e5ae4aceaa8a270cb6ebf137a8246 /src/vhdl/flists.ads | |
parent | a05c5813bee6c063dc196471e66816fbca5dc50e (diff) | |
download | ghdl-f526c1f41a2f5a8a5f70ee33f82d9e6b84117142.tar.gz ghdl-f526c1f41a2f5a8a5f70ee33f82d9e6b84117142.tar.bz2 ghdl-f526c1f41a2f5a8a5f70ee33f82d9e6b84117142.zip |
flists is now a generic package, add vhdl-flists
Diffstat (limited to 'src/vhdl/flists.ads')
-rw-r--r-- | src/vhdl/flists.ads | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/src/vhdl/flists.ads b/src/vhdl/flists.ads deleted file mode 100644 index 3d43c0f74..000000000 --- a/src/vhdl/flists.ads +++ /dev/null @@ -1,51 +0,0 @@ --- Fixed-length lists. --- Copyright (C) 2017 Tristan Gingold --- --- GHDL is free software; you can redistribute it and/or modify it under --- the terms of the GNU General Public License as published by the Free --- Software Foundation; either version 2, or (at your option) any later --- version. --- --- GHDL is distributed in the hope that it will be useful, but WITHOUT ANY --- WARRANTY; without even the implied warranty of MERCHANTABILITY or --- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --- for more details. --- --- You should have received a copy of the GNU General Public License --- along with GHDL; see the file COPYING. If not, write to the Free --- Software Foundation, 59 Temple Place - Suite 330, Boston, MA --- 02111-1307, USA. -with Types; use Types; -with Vhdl.Nodes_Priv; use Vhdl.Nodes_Priv; - -package Flists is - type Flist_Type is new Int32; - for Flist_Type'Size use 32; - - -- Non-existing flist. - Null_Flist : constant Flist_Type := 0; - - -- Predefined special flist that could be used as a marker. - Flist_Others : constant Flist_Type := 1; - Flist_All : constant Flist_Type := 2; - - -- Create a new flist of length LEN. All the elements are initialized to - -- Null_Node. - function Create_Flist (Len : Natural) return Flist_Type; - - -- Deallocate FLIST. Set to Null_Flist. - procedure Destroy_Flist (Flist : in out Flist_Type); - - -- First and last index of FLIST. Could be used to iterate. - Ffirst : constant Natural := 0; - function Flast (Flist : Flist_Type) return Integer; - - -- Return the length of FLIST. - function Length (Flist : Flist_Type) return Natural; - - -- Get the N-th element of FLIST. First element has index 0. - function Get_Nth_Element (Flist : Flist_Type; N : Natural) return Node_Type; - - -- Set the N-th element of FLIST to V. - procedure Set_Nth_Element (Flist : Flist_Type; N : Natural; V : Node_Type); -end Flists; |