fdf_parse Module



Contents


Variables

Type Visibility Attributes Name Initial
logical, private :: parse_debug = .FALSE.
integer(kind=ip), private :: parse_log = 0
integer(kind=ip), private, parameter :: MAX_NTOKENS = 50
integer, public, parameter :: SERIALIZED_LENGTH = MAX_LENGTH+4+10*MAX_NTOKENS

Interfaces

public interface search

  • public function search_fun(string, pline_fun, after, eq_func)

    Arguments

    Type IntentOptional Attributes Name
    character(len=*) :: string
    type(parsed_line), pointer :: pline_fun
    integer(kind=ip), intent(in), optional :: after
    public function eq_func(s1, s2)
    Arguments
    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: s1
    character(len=*), intent(in) :: s2
    Return Value logical

    Return Value integer(kind=ip)

  • public function search_sub(pline_sub, string, ind, after, eq_func)

    Arguments

    Type IntentOptional Attributes Name
    type(parsed_line), pointer :: pline_sub
    character(len=*) :: string
    integer(kind=ip), intent(out), optional :: ind
    integer(kind=ip), intent(in), optional :: after
    public function eq_func(s1, s2)
    Arguments
    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: s1
    character(len=*), intent(in) :: s2
    Return Value logical

    Return Value logical


Derived Types

type, public ::  parsed_line

Components

Type Visibility Attributes Name Initial
integer(kind=ip), public :: ntokens
character(len=MAX_LENGTH), public :: line
integer(kind=ip), public :: first(MAX_NTOKENS)
integer(kind=ip), public :: last(MAX_NTOKENS)
character(len=1), public :: id(MAX_NTOKENS)

Functions

public function nitems(class, pline, after)

Arguments

Type IntentOptional Attributes Name
character(len=1) :: class
type(parsed_line), pointer :: pline
integer(kind=ip), intent(in), optional :: after

Return Value integer(kind=ip)

public function nintegers(pline, after)

Arguments

Type IntentOptional Attributes Name
type(parsed_line), pointer :: pline
integer(kind=ip), intent(in), optional :: after

Return Value integer(kind=ip)

public function nreals(pline, after)

Arguments

Type IntentOptional Attributes Name
type(parsed_line), pointer :: pline
integer(kind=ip), intent(in), optional :: after

Return Value integer(kind=ip)

public function nvalues(pline, after)

Arguments

Type IntentOptional Attributes Name
type(parsed_line), pointer :: pline
integer(kind=ip), intent(in), optional :: after

Return Value integer(kind=ip)

public function nlists(pline, after)

Arguments

Type IntentOptional Attributes Name
type(parsed_line), pointer :: pline
integer(kind=ip), intent(in), optional :: after

Return Value integer(kind=ip)

public function nintegerlists(pline, after)

Arguments

Type IntentOptional Attributes Name
type(parsed_line), pointer :: pline
integer(kind=ip), intent(in), optional :: after

Return Value integer(kind=ip)

public function nreallists(pline, after)

Arguments

Type IntentOptional Attributes Name
type(parsed_line), pointer :: pline
integer(kind=ip), intent(in), optional :: after

Return Value integer(kind=ip)

public function nnames(pline, after)

Arguments

Type IntentOptional Attributes Name
type(parsed_line), pointer :: pline
integer(kind=ip), intent(in), optional :: after

Return Value integer(kind=ip)

public function nblocks(pline, after)

Arguments

Type IntentOptional Attributes Name
type(parsed_line), pointer :: pline
integer(kind=ip), intent(in), optional :: after

Return Value integer(kind=ip)

public function nendblocks(pline, after)

Arguments

Type IntentOptional Attributes Name
type(parsed_line), pointer :: pline
integer(kind=ip), intent(in), optional :: after

Return Value integer(kind=ip)

public function nlabels(pline, after)

Arguments

Type IntentOptional Attributes Name
type(parsed_line), pointer :: pline
integer(kind=ip), intent(in), optional :: after

Return Value integer(kind=ip)

public function ntokens(pline, after)

Arguments

Type IntentOptional Attributes Name
type(parsed_line), pointer :: pline
integer(kind=ip), intent(in), optional :: after

Return Value integer(kind=ip)

public function integers(pline, ind, after)

Arguments

Type IntentOptional Attributes Name
type(parsed_line), pointer :: pline
integer(kind=ip), intent(in) :: ind
integer(kind=ip), intent(in), optional :: after

Return Value integer(kind=ip)

public function reals(pline, ind, after)

Arguments

Type IntentOptional Attributes Name
type(parsed_line), pointer :: pline
integer(kind=ip), intent(in) :: ind
integer(kind=ip), intent(in), optional :: after

Return Value real(kind=dp)

public function values(pline, ind, after)

Arguments

Type IntentOptional Attributes Name
type(parsed_line), pointer :: pline
integer(kind=ip), intent(in) :: ind
integer(kind=ip), intent(in), optional :: after

Return Value real(kind=dp)

public function names(pline, ind, after)

Arguments

Type IntentOptional Attributes Name
type(parsed_line), pointer :: pline
integer(kind=ip), intent(in) :: ind
integer(kind=ip), intent(in), optional :: after

Return Value character(len=MAX_LENGTH)

public function blocks(pline)

Arguments

Type IntentOptional Attributes Name
type(parsed_line), pointer :: pline

Return Value character(len=MAX_LENGTH)

public function endblocks(pline)

Arguments

Type IntentOptional Attributes Name
type(parsed_line), pointer :: pline

Return Value character(len=MAX_LENGTH)

public function labels(pline)

Arguments

Type IntentOptional Attributes Name
type(parsed_line), pointer :: pline

Return Value character(len=MAX_LENGTH)

public function tokens(pline, ind, after)

Arguments

Type IntentOptional Attributes Name
type(parsed_line), pointer :: pline
integer(kind=ip), intent(in) :: ind
integer(kind=ip), intent(in), optional :: after

Return Value character(len=MAX_LENGTH)

public function characters(pline, ind_init, ind_final, after)

Arguments

Type IntentOptional Attributes Name
type(parsed_line), pointer :: pline
integer(kind=ip), intent(in) :: ind_init
integer(kind=ip), intent(in) :: ind_final
integer(kind=ip), intent(in), optional :: after

Return Value character(len=MAX_LENGTH)

public function digest(line) result(pline)

Arguments

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

Return Value type(parsed_line), pointer

public function search_fun(string, pline_fun, after, eq_func)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: string
type(parsed_line), pointer :: pline_fun
integer(kind=ip), intent(in), optional :: after
public function eq_func(s1, s2)
Arguments
Type IntentOptional Attributes Name
character(len=*), intent(in) :: s1
character(len=*), intent(in) :: s2
Return Value logical

Return Value integer(kind=ip)

public function search_sub(pline_sub, string, ind, after, eq_func)

Arguments

Type IntentOptional Attributes Name
type(parsed_line), pointer :: pline_sub
character(len=*) :: string
integer(kind=ip), intent(out), optional :: ind
integer(kind=ip), intent(in), optional :: after
public function eq_func(s1, s2)
Arguments
Type IntentOptional Attributes Name
character(len=*), intent(in) :: s1
character(len=*), intent(in) :: s2
Return Value logical

Return Value logical

public function substring_search(pline_sub, string, ind, after)

Arguments

Type IntentOptional Attributes Name
type(parsed_line), pointer :: pline_sub
character(len=*) :: string
integer(kind=ip), intent(out), optional :: ind
integer(kind=ip), intent(in), optional :: after

Return Value logical

public function match(pline, str, after)

Arguments

Type IntentOptional Attributes Name
type(parsed_line), pointer :: pline
character(len=*), intent(in) :: str
integer(kind=ip), intent(in), optional :: after

Return Value logical

private function is_integer(string)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: string

Return Value logical

private function is_value(string)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: string

Return Value logical


Subroutines

private subroutine create(pline)

Arguments

Type IntentOptional Attributes Name
type(parsed_line), pointer :: pline

public subroutine destroy(pline)

Arguments

Type IntentOptional Attributes Name
type(parsed_line), pointer :: pline

public subroutine reallists(pline, ind, nv, list, after)

Arguments

Type IntentOptional Attributes Name
type(parsed_line), pointer :: pline
integer(kind=ip), intent(in) :: ind
integer(kind=ip) :: nv
real(kind=dp) :: list(nv)
integer(kind=ip), intent(in), optional :: after

public subroutine valuelists(pline, ind, nv, list, after)

Arguments

Type IntentOptional Attributes Name
type(parsed_line), pointer :: pline
integer(kind=ip), intent(in) :: ind
integer(kind=ip) :: nv
real(kind=dp) :: list(nv)
integer(kind=ip), intent(in), optional :: after

public subroutine integerlists(pline, ind, ni, list, after)

Arguments

Type IntentOptional Attributes Name
type(parsed_line), pointer :: pline
integer(kind=ip), intent(in) :: ind
integer(kind=ip) :: ni
integer(kind=ip) :: list(ni)
integer(kind=ip), intent(in), optional :: after

private subroutine parses(ntokens, line, first, last)

Arguments

Type IntentOptional Attributes Name
integer(kind=ip) :: ntokens
character(len=*) :: line
integer(kind=ip) :: first(MAX_NTOKENS)
integer(kind=ip) :: last(MAX_NTOKENS)

private subroutine morphol(ntokens, line, first, last, token_id)

Arguments

Type IntentOptional Attributes Name
integer(kind=ip) :: ntokens
character(len=*) :: line
integer(kind=ip) :: first(MAX_NTOKENS)
integer(kind=ip) :: last(MAX_NTOKENS)
character(len=1) :: token_id(MAX_NTOKENS)

public subroutine setmorphol(ntoken, token_id, pline)

Arguments

Type IntentOptional Attributes Name
integer(kind=ip) :: ntoken
character(len=1) :: token_id
type(parsed_line), pointer :: pline

public subroutine setdebug(level)

Arguments

Type IntentOptional Attributes Name
integer(kind=ip) :: level

public subroutine setlog(unit)

Arguments

Type IntentOptional Attributes Name
integer(kind=ip) :: unit

public subroutine serialize_pline(pline, string, length)

Arguments

Type IntentOptional Attributes Name
type(parsed_line) :: pline
character(len=*), intent(out) :: string
integer, intent(out) :: length

public subroutine recreate_pline(pline, string)

Arguments

Type IntentOptional Attributes Name
type(parsed_line), pointer :: pline
character(len=*), intent(in) :: string