lazy_dfa__preprocess Subroutine

private pure subroutine lazy_dfa__preprocess(self)

This subroutine determines the number of DFA nodes the graph has and allocate the array.

Type Bound

dfa_graph_t

Arguments

Type IntentOptional Attributes Name
class(dfa_graph_t), intent(inout) :: self

Source Code

   pure subroutine lazy_dfa__preprocess (self)
      implicit none
      class(dfa_graph_t), intent(inout) :: self

      integer(int32) :: i, base, limit

      ! Initialize DFA
      base = self%dfa_base
      limit = self%dfa_limit

      allocate(self%nodes(base:limit))

      self%alloc_count_node = 1

      self%nodes(:)%own_i = [(i, i=base, limit)]

      self%dfa_top = DFA_INITIAL_INDEX    ! Acts as an initialized flag

   end subroutine lazy_dfa__preprocess