forgex_nfa_graph_m Module

This module defines the nfa_graph_t derived-type which represents the NFA graph.



Derived Types

type, public ::  nfa_graph_t

Components

Type Visibility Attributes Name Initial
integer(kind=int32), public :: nfa_base = NFA_STATE_BASE
integer(kind=int32), public :: nfa_limit = NFA_STATE_LIMIT
integer(kind=int32), public :: nfa_top = 0
type(nfa_state_node_t), public, allocatable :: nodes(:)

Type-Bound Procedures

procedure, public :: build => nfa_graph__build
procedure, public :: collect_epsilon_transition => nfa_graph__collect_epsilon_transition
procedure, public :: free => nfa_graph__deallocate
procedure, public :: generate => nfa_graph__generate
procedure, public :: mark_epsilon_transition => nfa_graph__mark_epsilon_transition
procedure, public :: print => nfa_graph__print

Subroutines

private pure subroutine nfa_graph__build(self, tree, nfa_entry, nfa_exit, all_segments)

Arguments

Type IntentOptional Attributes Name
class(nfa_graph_t), intent(inout) :: self
type(tree_t), intent(in) :: tree
integer(kind=int32), intent(inout) :: nfa_entry
integer(kind=int32), intent(inout) :: nfa_exit
type(segment_t), intent(inout), allocatable :: all_segments(:)

private pure subroutine nfa_graph__collect_epsilon_transition(self, state_set)

Arguments

Type IntentOptional Attributes Name
class(nfa_graph_t), intent(in) :: self
type(nfa_state_set_t), intent(inout) :: state_set

private pure subroutine nfa_graph__deallocate(self)

This subroutine invokes procedure for deallocation.

Arguments

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

private pure subroutine nfa_graph__generate(self, tree, entry, exit)

Arguments

Type IntentOptional Attributes Name
class(nfa_graph_t), intent(inout) :: self
type(tree_t), intent(in) :: tree
integer(kind=int32), intent(in) :: entry
integer(kind=int32), intent(in) :: exit

private pure recursive subroutine nfa_graph__mark_epsilon_transition(self, state_set, idx)

Arguments

Type IntentOptional Attributes Name
class(nfa_graph_t), intent(in) :: self
type(nfa_state_set_t), intent(inout) :: state_set
integer, intent(in) :: idx

private subroutine nfa_graph__print(self, uni, nfa_exit)

Arguments

Type IntentOptional Attributes Name
class(nfa_graph_t), intent(in) :: self
integer(kind=int32), intent(in) :: uni
integer(kind=int32), intent(in) :: nfa_exit