From 506d49798a78f67735c9a529eb849c152ced1e4b Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 27 Jan 2016 05:10:10 +0100 Subject: psl: use Tables instead of GNAT.Table, regenerate, add copyrights. --- src/psl/Makefile | 49 ++++++++++++++++++++++++++++++++++++++++++++++ src/psl/psl-build.adb | 31 +++++++++++++++++++++-------- src/psl/psl-build.ads | 18 +++++++++++++++++ src/psl/psl-cse.adb | 18 +++++++++++++++++ src/psl/psl-cse.ads | 18 +++++++++++++++++ src/psl/psl-disp_nfas.adb | 18 +++++++++++++++++ src/psl/psl-disp_nfas.ads | 18 +++++++++++++++++ src/psl/psl-dump_tree.adb | 19 +++++++++++++++++- src/psl/psl-dump_tree.ads | 18 +++++++++++++++++ src/psl/psl-hash.adb | 25 +++++++++++++++++++---- src/psl/psl-hash.ads | 18 +++++++++++++++++ src/psl/psl-nfas-utils.adb | 18 +++++++++++++++++ src/psl/psl-nfas-utils.ads | 19 +++++++++++++++++- src/psl/psl-nfas.adb | 35 +++++++++++++++++++++++---------- src/psl/psl-nfas.ads | 18 +++++++++++++++++ src/psl/psl-nodes.adb | 26 +++++++++++++++++++----- src/psl/psl-nodes.adb.in | 27 +++++++++++++++++++------ src/psl/psl-nodes.ads | 18 +++++++++++++++++ src/psl/psl-nodes_meta.adb | 34 ++++++++++++++++---------------- src/psl/psl-optimize.adb | 18 +++++++++++++++++ src/psl/psl-optimize.ads | 18 +++++++++++++++++ src/psl/psl-prints.adb | 19 +++++++++++++++++- src/psl/psl-prints.ads | 19 +++++++++++++++++- src/psl/psl-priorities.ads | 18 +++++++++++++++++ src/psl/psl-qm.adb | 18 +++++++++++++++++ src/psl/psl-qm.ads | 21 +++++++++++++++++--- src/psl/psl-subsets.adb | 19 +++++++++++++++++- src/psl/psl-subsets.ads | 18 +++++++++++++++++ src/psl/psl-tprint.adb | 19 +++++++++++++++++- src/psl/psl-tprint.ads | 18 +++++++++++++++++ src/psl/psl.ads | 18 +++++++++++++++++ 31 files changed, 609 insertions(+), 59 deletions(-) create mode 100644 src/psl/Makefile diff --git a/src/psl/Makefile b/src/psl/Makefile new file mode 100644 index 000000000..ef6439328 --- /dev/null +++ b/src/psl/Makefile @@ -0,0 +1,49 @@ +# Copyright (C) 2002 - 2015 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 GCC; see the file COPYING. If not, write to the Free +# Software Foundation, 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# Some files are automatically generated using pnodes.py +# This Makefile can be used to regenerate these files. Generated files must +# be committed and distribued with the sources, so that users don't need to +# regenerate them (and don't need to have python installed). + +PNODES=../xtools/pnodes.py + +DEPS=psl-nodes.ads psl-nodes.adb.in $(PNODES) + +PNODES_FLAGS=--field-file=psl-nodes.adb.in --spec-file=psl-nodes.ads --template-file=psl-nodes.adb.in --meta-basename=psl-nodes_meta --kind-type=Nkind --kind-prefix=N_ --node-type=Node + +GEN_FILES=psl-nodes.adb psl-nodes_meta.ads psl-nodes_meta.adb + +all: $(GEN_FILES) + +psl-nodes.adb: psl-nodes.adb.in $(DEPS) + $(RM) $@ + $(PNODES) $(PNODES_FLAGS) body > $@ + chmod -w $@ + +psl-nodes_meta.ads: psl-nodes_meta.ads.in $(DEPS) + $(RM) $@ + $(PNODES) $(PNODES_FLAGS) meta_specs > $@ + chmod -w $@ + +psl-nodes_meta.adb: psl-nodes_meta.adb.in $(DEPS) + $(RM) $@ + $(PNODES) $(PNODES_FLAGS) meta_body > $@ + chmod -w $@ + +clean: + $(RM) -f $(GEN_FILES) diff --git a/src/psl/psl-build.adb b/src/psl/psl-build.adb index c3e47baa6..661d758bf 100644 --- a/src/psl/psl-build.adb +++ b/src/psl/psl-build.adb @@ -1,4 +1,22 @@ -with GNAT.Table; +-- PSL - NFA builder. +-- Copyright (C) 2002-2016 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 Tables; with Ada.Text_IO; use Ada.Text_IO; with Types; use Types; with PSL.Errors; use PSL.Errors; @@ -13,7 +31,6 @@ with PSL.NFAs; use PSL.NFAs; package body PSL.Build is function Build_SERE_FA (N : Node) return NFA; - package Intersection is function Build_Inter (L, R : NFA; Match_Len : Boolean) return NFA; end Intersection; @@ -28,12 +45,11 @@ package body PSL.Build is Next_Unhandled : Stack_Entry_Id; end record; - package Stackt is new GNAT.Table + package Stackt is new Tables (Table_Component_Type => Stack_Entry, Table_Index_Type => Stack_Entry_Id, Table_Low_Bound => 1, - Table_Initial => 128, - Table_Increment => 100); + Table_Initial => 128); First_Unhandled : Stack_Entry_Id; @@ -598,12 +614,11 @@ package body PSL.Build is -- + value ? end record; - package Detert is new GNAT.Table + package Detert is new Tables (Table_Component_Type => Deter_Tree_Entry, Table_Index_Type => Deter_Tree_Id, Table_Low_Bound => 1, - Table_Initial => 128, - Table_Increment => 100); + Table_Initial => 128); type Bool_Vector is array (Natural range <>) of Boolean; pragma Pack (Bool_Vector); diff --git a/src/psl/psl-build.ads b/src/psl/psl-build.ads index d0ca26a39..c8e15ee22 100644 --- a/src/psl/psl-build.ads +++ b/src/psl/psl-build.ads @@ -1,3 +1,21 @@ +-- PSL - NFA builder. +-- Copyright (C) 2002-2016 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 PSL.Nodes; use PSL.Nodes; package PSL.Build is diff --git a/src/psl/psl-cse.adb b/src/psl/psl-cse.adb index 5d6f3df13..ed4fc7282 100644 --- a/src/psl/psl-cse.adb +++ b/src/psl/psl-cse.adb @@ -1,3 +1,21 @@ +-- PSL - Simplify expressions +-- Copyright (C) 2002-2016 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 Ada.Text_IO; with PSL.Prints; with Types; use Types; diff --git a/src/psl/psl-cse.ads b/src/psl/psl-cse.ads index e40b0eeb2..915ef9884 100644 --- a/src/psl/psl-cse.ads +++ b/src/psl/psl-cse.ads @@ -1,3 +1,21 @@ +-- PSL - Simplify expressions +-- Copyright (C) 2002-2016 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 PSL.Nodes; use PSL.Nodes; package PSL.CSE is diff --git a/src/psl/psl-disp_nfas.adb b/src/psl/psl-disp_nfas.adb index c8f1532b9..676eff57f 100644 --- a/src/psl/psl-disp_nfas.adb +++ b/src/psl/psl-disp_nfas.adb @@ -1,3 +1,21 @@ +-- PSL - Disp nodes +-- Copyright (C) 2002-2016 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 Ada.Text_IO; use Ada.Text_IO; with Types; use Types; with PSL.Prints; use PSL.Prints; diff --git a/src/psl/psl-disp_nfas.ads b/src/psl/psl-disp_nfas.ads index 901eed72f..fa1e8cb18 100644 --- a/src/psl/psl-disp_nfas.ads +++ b/src/psl/psl-disp_nfas.ads @@ -1,3 +1,21 @@ +-- PSL - Disp nodes +-- Copyright (C) 2002-2016 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 PSL.NFAs; use PSL.NFAs; with PSL.Nodes; use PSL.Nodes; diff --git a/src/psl/psl-dump_tree.adb b/src/psl/psl-dump_tree.adb index 0ce376346..93a407138 100644 --- a/src/psl/psl-dump_tree.adb +++ b/src/psl/psl-dump_tree.adb @@ -1,4 +1,21 @@ --- This is in fact -*- Ada -*- +-- PSL - Disp nodes +-- Copyright (C) 2002-2016 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 Ada.Text_IO; use Ada.Text_IO; with Types; use Types; with Name_Table; diff --git a/src/psl/psl-dump_tree.ads b/src/psl/psl-dump_tree.ads index f8b2eb3ab..bf412d0dd 100644 --- a/src/psl/psl-dump_tree.ads +++ b/src/psl/psl-dump_tree.ads @@ -1,3 +1,21 @@ +-- PSL - Disp nodes +-- Copyright (C) 2002-2016 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 PSL.Nodes; use PSL.Nodes; package PSL.Dump_Tree is diff --git a/src/psl/psl-hash.adb b/src/psl/psl-hash.adb index 62744b336..3333066bb 100644 --- a/src/psl/psl-hash.adb +++ b/src/psl/psl-hash.adb @@ -1,4 +1,22 @@ -with GNAT.Table; +-- PSL - HDL interface. +-- Copyright (C) 2002-2016 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 Tables; package body PSL.Hash is @@ -12,12 +30,11 @@ package body PSL.Hash is Hash_Size : constant Index_Type := 127; - package Cells is new GNAT.Table + package Cells is new Tables (Table_Component_Type => Cell_Record, Table_Index_Type => Index_Type, Table_Low_Bound => 0, - Table_Initial => 256, - Table_Increment => 100); + Table_Initial => 256); procedure Init is begin diff --git a/src/psl/psl-hash.ads b/src/psl/psl-hash.ads index d1a60c971..a464ebd6b 100644 --- a/src/psl/psl-hash.ads +++ b/src/psl/psl-hash.ads @@ -1,3 +1,21 @@ +-- PSL - HDL interface. +-- Copyright (C) 2002-2016 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 PSL.Nodes; use PSL.Nodes; diff --git a/src/psl/psl-nfas-utils.adb b/src/psl/psl-nfas-utils.adb index 06601850d..152cd752e 100644 --- a/src/psl/psl-nfas-utils.adb +++ b/src/psl/psl-nfas-utils.adb @@ -1,3 +1,21 @@ +-- PSL - Utils +-- Copyright (C) 2002-2016 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 PSL.Errors; use PSL.Errors; package body PSL.NFAs.Utils is diff --git a/src/psl/psl-nfas-utils.ads b/src/psl/psl-nfas-utils.ads index bdbc0d013..f30f665a8 100644 --- a/src/psl/psl-nfas-utils.ads +++ b/src/psl/psl-nfas-utils.ads @@ -1,3 +1,21 @@ +-- PSL - Utils +-- Copyright (C) 2002-2016 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. + package PSL.NFAs.Utils is -- Sort outgoing edges by expression. procedure Sort_Src_Edges (S : NFA_State); @@ -18,4 +36,3 @@ package PSL.NFAs.Utils is -- Raise Program_Error if N is not internally coherent. procedure Check_NFA (N : NFA); end PSL.NFAs.Utils; - diff --git a/src/psl/psl-nfas.adb b/src/psl/psl-nfas.adb index da4866e53..0a4348901 100644 --- a/src/psl/psl-nfas.adb +++ b/src/psl/psl-nfas.adb @@ -1,4 +1,22 @@ -with GNAT.Table; +-- PSL - NFA definition +-- Copyright (C) 2002-2016 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 Tables; package body PSL.NFAs is -- Record that describes an NFA. @@ -46,34 +64,31 @@ package body PSL.NFAs is end record; -- Table of NFA. - package Nfat is new GNAT.Table + package Nfat is new Tables (Table_Component_Type => NFA_Node, Table_Index_Type => NFA, Table_Low_Bound => 1, - Table_Initial => 128, - Table_Increment => 100); + Table_Initial => 128); -- List of free nodes. Free_Nfas : NFA := No_NFA; -- Table of States. - package Statet is new GNAT.Table + package Statet is new Tables (Table_Component_Type => NFA_State_Node, Table_Index_Type => NFA_State, Table_Low_Bound => 1, - Table_Initial => 128, - Table_Increment => 100); + Table_Initial => 128); -- List of free states. Free_States : NFA_State := No_State; -- Table of edges. - package Transt is new GNAT.Table + package Transt is new Tables (Table_Component_Type => NFA_Edge_Node, Table_Index_Type => NFA_Edge, Table_Low_Bound => 1, - Table_Initial => 128, - Table_Increment => 100); + Table_Initial => 128); -- List of free edges. Free_Edges : NFA_Edge := No_Edge; diff --git a/src/psl/psl-nfas.ads b/src/psl/psl-nfas.ads index 815acf223..ffcf6fd1f 100644 --- a/src/psl/psl-nfas.ads +++ b/src/psl/psl-nfas.ads @@ -1,3 +1,21 @@ +-- PSL - NFA definition +-- Copyright (C) 2002-2016 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 PSL.Nodes; use PSL.Nodes; diff --git a/src/psl/psl-nodes.adb b/src/psl/psl-nodes.adb index b5464a194..263994d21 100644 --- a/src/psl/psl-nodes.adb +++ b/src/psl/psl-nodes.adb @@ -1,6 +1,23 @@ --- This is in fact -*- Ada -*- +-- PSL - Nodes definition. This is in fact -*- Ada -*- +-- Copyright (C) 2002-2016 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 Ada.Unchecked_Conversion; -with GNAT.Table; +with Tables; with PSL.Errors; with PSL.Hash; with PSL.Nodes_Meta; use PSL.Nodes_Meta; @@ -78,12 +95,11 @@ package body PSL.Nodes is pragma Pack (Node_Record); for Node_Record'Size use 8 * 32; - package Nodet is new GNAT.Table + package Nodet is new Tables (Table_Component_Type => Node_Record, Table_Index_Type => Node, Table_Low_Bound => 1, - Table_Initial => 1024, - Table_Increment => 100); + Table_Initial => 1024); Init_Node : constant Node_Record := (Kind => N_Error, Flag1 => False, diff --git a/src/psl/psl-nodes.adb.in b/src/psl/psl-nodes.adb.in index 775e1d911..0ab97b572 100644 --- a/src/psl/psl-nodes.adb.in +++ b/src/psl/psl-nodes.adb.in @@ -1,6 +1,23 @@ --- This is in fact -*- Ada -*- +-- PSL - Nodes definition. This is in fact -*- Ada -*- +-- Copyright (C) 2002-2016 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 Ada.Unchecked_Conversion; -with GNAT.Table; +with Tables; with PSL.Errors; with PSL.Hash; with PSL.Nodes_Meta; use PSL.Nodes_Meta; @@ -78,12 +95,11 @@ package body PSL.Nodes is pragma Pack (Node_Record); for Node_Record'Size use 8 * 32; - package Nodet is new GNAT.Table + package Nodet is new Tables (Table_Component_Type => Node_Record, Table_Index_Type => Node, Table_Low_Bound => 1, - Table_Initial => 1024, - Table_Increment => 100); + Table_Initial => 1024); Init_Node : constant Node_Record := (Kind => N_Error, Flag1 => False, @@ -385,4 +401,3 @@ package body PSL.Nodes is -- Subprograms end PSL.Nodes; - diff --git a/src/psl/psl-nodes.ads b/src/psl/psl-nodes.ads index b2a9a1caa..9d6388c1d 100644 --- a/src/psl/psl-nodes.ads +++ b/src/psl/psl-nodes.ads @@ -1,3 +1,21 @@ +-- PSL - Nodes definition +-- Copyright (C) 2002-2016 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; package PSL.Nodes is diff --git a/src/psl/psl-nodes_meta.adb b/src/psl/psl-nodes_meta.adb index 2ef5db9b0..2559ec4a6 100644 --- a/src/psl/psl-nodes_meta.adb +++ b/src/psl/psl-nodes_meta.adb @@ -343,10 +343,10 @@ package body PSL.Nodes_Meta is Field_Prefix, -- N_Assert_Directive Field_Label, + Field_NFA, Field_Chain, Field_String, Field_Property, - Field_NFA, -- N_Property_Declaration Field_Identifier, Field_Chain, @@ -380,21 +380,21 @@ package body PSL.Nodes_Meta is Field_Chain, Field_Actual, -- N_Sequence_Instance - Field_Declaration, Field_Association_Chain, - -- N_Endpoint_Instance Field_Declaration, + -- N_Endpoint_Instance Field_Association_Chain, - -- N_Property_Instance Field_Declaration, + -- N_Property_Instance Field_Association_Chain, + Field_Declaration, -- N_Actual Field_Chain, Field_Actual, Field_Formal, -- N_Clock_Event - Field_Property, Field_Boolean, + Field_Property, -- N_Always Field_Property, -- N_Never @@ -429,23 +429,23 @@ package body PSL.Nodes_Meta is -- N_Next_Event Field_Strong_Flag, Field_Number, - Field_Property, Field_Boolean, + Field_Property, -- N_Next_Event_A Field_Strong_Flag, Field_Low_Bound, Field_High_Bound, - Field_Property, Field_Boolean, + Field_Property, -- N_Next_Event_E Field_Strong_Flag, Field_Low_Bound, Field_High_Bound, - Field_Property, Field_Boolean, - -- N_Abort Field_Property, + -- N_Abort Field_Boolean, + Field_Property, -- N_Until Field_Strong_Flag, Field_Inclusive_Flag, @@ -483,47 +483,47 @@ package body PSL.Nodes_Meta is Field_Left, Field_Right, -- N_Star_Repeat_Seq - Field_Sequence, Field_Low_Bound, Field_High_Bound, - -- N_Goto_Repeat_Seq Field_Sequence, + -- N_Goto_Repeat_Seq Field_Low_Bound, Field_High_Bound, + Field_Sequence, -- N_Plus_Repeat_Seq Field_Sequence, -- N_Equal_Repeat_Seq - Field_Sequence, Field_Low_Bound, Field_High_Bound, + Field_Sequence, -- N_Not_Bool + Field_Hash, Field_Presence, Field_Boolean, - Field_Hash, Field_Hash_Link, -- N_And_Bool + Field_Hash, Field_Presence, Field_Left, Field_Right, - Field_Hash, Field_Hash_Link, -- N_Or_Bool + Field_Hash, Field_Presence, Field_Left, Field_Right, - Field_Hash, Field_Hash_Link, -- N_Imp_Bool + Field_Hash, Field_Presence, Field_Left, Field_Right, - Field_Hash, Field_Hash_Link, -- N_HDL_Expr - Field_Presence, Field_HDL_Node, Field_HDL_Index, Field_Hash, + Field_Presence, Field_Hash_Link, -- N_False -- N_True diff --git a/src/psl/psl-optimize.adb b/src/psl/psl-optimize.adb index 4ca62b89e..9ff9b1af7 100644 --- a/src/psl/psl-optimize.adb +++ b/src/psl/psl-optimize.adb @@ -1,3 +1,21 @@ +-- PSL - Optimize NFA +-- Copyright (C) 2002-2016 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 PSL.NFAs.Utils; use PSL.NFAs.Utils; with PSL.CSE; diff --git a/src/psl/psl-optimize.ads b/src/psl/psl-optimize.ads index 5f36a0739..80dc33c1c 100644 --- a/src/psl/psl-optimize.ads +++ b/src/psl/psl-optimize.ads @@ -1,3 +1,21 @@ +-- PSL - Optimize NFA +-- Copyright (C) 2002-2016 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 PSL.NFAs; use PSL.NFAs; with PSL.Nodes; use PSL.Nodes; diff --git a/src/psl/psl-prints.adb b/src/psl/psl-prints.adb index 80da47dab..19d7c3959 100644 --- a/src/psl/psl-prints.adb +++ b/src/psl/psl-prints.adb @@ -1,3 +1,21 @@ +-- PSL - Pretty print +-- Copyright (C) 2002-2016 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 PSL.Errors; use PSL.Errors; with Name_Table; use Name_Table; @@ -430,4 +448,3 @@ package body PSL.Prints is Put_Line ("}"); end Print_Unit; end PSL.Prints; - diff --git a/src/psl/psl-prints.ads b/src/psl/psl-prints.ads index 18a36f78f..920ca5939 100644 --- a/src/psl/psl-prints.ads +++ b/src/psl/psl-prints.ads @@ -1,3 +1,21 @@ +-- PSL - Pretty print +-- Copyright (C) 2002-2016 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 PSL.Nodes; use PSL.Nodes; with PSL.Priorities; use PSL.Priorities; @@ -17,4 +35,3 @@ package PSL.Prints is procedure Dump_Expr (N : Node); end PSL.Prints; - diff --git a/src/psl/psl-priorities.ads b/src/psl/psl-priorities.ads index cb49239e4..48e11edd1 100644 --- a/src/psl/psl-priorities.ads +++ b/src/psl/psl-priorities.ads @@ -1,3 +1,21 @@ +-- PSL - Operator priorities +-- Copyright (C) 2002-2016 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. + package PSL.Priorities is -- Operator priorities, defined by PSL1.1 4.2.3.2 type Priority is diff --git a/src/psl/psl-qm.adb b/src/psl/psl-qm.adb index f5b5e1db3..719329b8f 100644 --- a/src/psl/psl-qm.adb +++ b/src/psl/psl-qm.adb @@ -1,3 +1,21 @@ +-- PSL - Small QM reduction +-- Copyright (C) 2002-2016 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 Ada.Text_IO; with Types; use Types; with PSL.Errors; use PSL.Errors; diff --git a/src/psl/psl-qm.ads b/src/psl/psl-qm.ads index 85f1e3cf4..b5db759e7 100644 --- a/src/psl/psl-qm.ads +++ b/src/psl/psl-qm.ads @@ -1,3 +1,21 @@ +-- PSL - Small QM reduction +-- Copyright (C) 2002-2016 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 PSL.Nodes; use PSL.Nodes; with Interfaces; use Interfaces; @@ -44,6 +62,3 @@ private Set : Set_Type (1 .. Max); end record; end PSL.QM; - - - diff --git a/src/psl/psl-subsets.adb b/src/psl/psl-subsets.adb index f322eafda..6b0e5d50c 100644 --- a/src/psl/psl-subsets.adb +++ b/src/psl/psl-subsets.adb @@ -1,3 +1,21 @@ +-- PSL - Simple subset +-- Copyright (C) 2002-2016 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 PSL.Errors; use PSL.Errors; with Types; use Types; @@ -174,4 +192,3 @@ package body PSL.Subsets is end case; end Check_Simple; end PSL.Subsets; - diff --git a/src/psl/psl-subsets.ads b/src/psl/psl-subsets.ads index c3bae09ef..7ba2b8007 100644 --- a/src/psl/psl-subsets.ads +++ b/src/psl/psl-subsets.ads @@ -1,3 +1,21 @@ +-- PSL - Simple subset +-- Copyright (C) 2002-2016 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 PSL.Nodes; use PSL.Nodes; package PSL.Subsets is diff --git a/src/psl/psl-tprint.adb b/src/psl/psl-tprint.adb index eabe8bd28..3165750a6 100644 --- a/src/psl/psl-tprint.adb +++ b/src/psl/psl-tprint.adb @@ -1,3 +1,21 @@ +-- PSL - Printer +-- Copyright (C) 2002-2016 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 PSL.Errors; use PSL.Errors; with PSL.Prints; @@ -252,4 +270,3 @@ package body PSL.Tprint is Put_Line ("}"); end Disp_Unit; end PSL.Tprint; - diff --git a/src/psl/psl-tprint.ads b/src/psl/psl-tprint.ads index 1b06ebf1a..6207b3c7b 100644 --- a/src/psl/psl-tprint.ads +++ b/src/psl/psl-tprint.ads @@ -1,3 +1,21 @@ +-- PSL - Printer +-- Copyright (C) 2002-2016 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 PSL.Nodes; use PSL.Nodes; package PSL.Tprint is diff --git a/src/psl/psl.ads b/src/psl/psl.ads index a2f4bdce0..2a882f5b3 100644 --- a/src/psl/psl.ads +++ b/src/psl/psl.ads @@ -1,3 +1,21 @@ +-- PSL +-- Copyright (C) 2002-2016 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. + package PSL is pragma Pure (PSL); end PSL; -- cgit v1.2.3