module lexer_types

!  Type definitions for the lexer

!  The terminal symbols of the grammar.  The corresponding constants
!  must be typed into the grammar as integer literal values.

  implicit none
  public
  type :: Where_T
    integer :: File = 0            ! String index
    integer :: Source = 0          ! 256*srcLine + srcCol
  end type Where_T

  type :: Token
    integer :: Class               ! token class = token index
    integer :: String_index        ! position in string table
    logical :: Pseudo              ! "token is pseudo-terminal"
    type(where_t) :: Where
  end type Token

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

contains

!--------------------------- end bloc --------------------------------------
  logical function not_used_here()
  character (len=*), parameter :: IdParm = &
       "$Id: lexer_types.f90,v 1.1 2022/01/24 22:08:44 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 lexer_types

! $Log: lexer_types.f90,v $
! Revision 1.1  2022/01/24 22:08:44  vsnyder
! Initial commit
!
