forgex_syntax_tree_optimize_m Module



Functions

public pure function get_entire_literal(tree) result(chara)

Arguments

Type IntentOptional Attributes Name
type(tree_t), intent(in) :: tree

Return Value character(len=:), allocatable

public pure function get_prefix_literal(tree) result(chara)

Arguments

Type IntentOptional Attributes Name
type(tree_t), intent(in) :: tree

Return Value character(len=:), allocatable

public pure function get_suffix_literal(tree) result(chara)

Arguments

Type IntentOptional Attributes Name
type(tree_t), intent(in) :: tree

Return Value character(len=:), allocatable

private pure function extract_same_part_middle(left_middle, right_middle) result(middle)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: left_middle
character(len=*), intent(in) :: right_middle

Return Value character(len=:), allocatable

private pure function extract_same_part_prefix(a, b) result(res)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: a
character(len=*), intent(in) :: b

Return Value character(len=:), allocatable

private pure function extract_same_part_suffix(a, b) result(res)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: a
character(len=*), intent(in) :: b

Return Value character(len=:), allocatable

private pure function is_char_class_tree_node(node) result(res)

Arguments

Type IntentOptional Attributes Name
type(tree_node_t), intent(in) :: node

Return Value logical

private pure function is_literal_tree_node(node) result(res)

Arguments

Type IntentOptional Attributes Name
type(tree_node_t), intent(in) :: node

Return Value logical


Subroutines

private pure recursive subroutine get_entire_literal_internal(tree, idx, literal, res)

Arguments

Type IntentOptional Attributes Name
type(tree_node_t), intent(in) :: tree(:)
integer(kind=int32), intent(in) :: idx
character(len=:), intent(inout), allocatable :: literal
logical, intent(inout) :: res

private pure recursive subroutine get_prefix_literal_internal(tree, idx, prefix, res)

Arguments

Type IntentOptional Attributes Name
type(tree_node_t), intent(in) :: tree(:)
integer(kind=int32), intent(in) :: idx
character(len=:), intent(inout), allocatable :: prefix
logical, intent(inout) :: res

private pure recursive subroutine get_suffix_literal_internal(tree, idx, suffix, has_or, has_closure)

Arguments

Type IntentOptional Attributes Name
type(tree_node_t), intent(in) :: tree(:)
integer(kind=int32), intent(in) :: idx
character(len=:), intent(inout), allocatable :: suffix
logical, intent(inout) :: has_or
logical, intent(inout) :: has_closure