add_nfa_state Subroutine

public pure subroutine add_nfa_state(state_set, s)

This subroutine adds a specified state (s) to an NFA state set state_set by setting the corresponding element in state%vec to true.

Arguments

Type IntentOptional Attributes Name
type(nfa_state_set_t), intent(inout) :: state_set
integer(kind=int32), intent(in) :: s

Source Code

   pure subroutine add_nfa_state(state_set, s)
      implicit none
      type(nfa_state_set_t), intent(inout) :: state_set  ! NFA state set to modify.
      integer(int32),        intent(in)    :: s          ! State index to add to the state set

      ! Set the state `s` in the `state_set` to `.true.`
      state_set%vec(s) = .true.
   end subroutine add_nfa_state