module Declaration_Types

  ! Define the types of declaration table objects

  implicit NONE
  public

  enum, bind(C) ! Nothing to do with C, but this is the required syntax
    enumerator :: Empty           ! Required. Not one of the others. Used
                                  ! for the default initializer for the
                                  ! Type component of type Decls.
    enumerator :: Func            ! Symbol is a function name
  end enum

  integer, parameter :: Last_Type = Func

  ! Strings need to be in the same order as type names
  character(len=*), parameter :: Type_Names(empty:last_type) = &
    [ 'Empty', &
    & 'Func '  ]

  ! Value field of declaration table
  enum, bind(C) ! Nothing to do with C, but that's the required syntax
    ! Indices of spec names. S_ prefix means "spec name"
    enumerator :: F_Block = 1 ! Logic block
    enumerator :: F_Dot       ! "Dot" wired-or or wired-nand
    enumerator :: F_Line      ! Circuit trace
  end enum

  integer, parameter :: First_Value = F_Block, Last_Value=F_Line
  character(*), parameter :: Value_Names(first_value:last_value) = [ &
  ! Spec names
    'Block  ', &
    'Dot    ', &
    'Line   ' ]

!---------------------------- RCS Module Info ------------------------------
  character (len=*), private, parameter :: ModuleName= &
       "$RCSfile: Declaration_Types.f90,v $"
  private :: not_used_here 
!---------------------------------------------------------------------------

contains

!--------------------------- end bloc --------------------------------------
  logical function not_used_here()
  character (len=*), parameter :: IdParm = &
       "$Id: Declaration_Types.f90,v 1.1 2022/01/24 21:58:15 vsnyder Exp $"
  character (len=len(idParm)) :: Id = idParm
    not_used_here = (id(1:1) == ModuleName(1:1))
    print *, Id ! .mod files sometimes change if PRINT is added
  end function not_used_here
!---------------------------------------------------------------------------

end module Declaration_Types

! $Log: Declaration_Types.f90,v $
! Revision 1.1  2022/01/24 21:58:15  vsnyder
! Initial commit
!
