TOML Fortran (toml-f)#

TOML Fortran is a TOML parser implementation for data serialization and deserialization in Fortran.

All 35 modules from toml-f v0.5.0 are auto-documented below via the FORD bridge.

module tomlf#

Uses: tomlf_build, tomlf_datetime, tomlf_de, tomlf_error, tomlf_ser, tomlf_terminal, tomlf_type, tomlf_utils_sort, tomlf_version

module tomlf_all#

Uses: tomlf_build, tomlf_constants, tomlf_datetime, tomlf_de, tomlf_error, tomlf_ser, tomlf_structure, tomlf_type, tomlf_utils, tomlf_version

module tomlf_build#

Uses: tomlf_build_array, tomlf_build_keyval, tomlf_build_merge, tomlf_build_path, tomlf_build_table

module tomlf_build_array#

Uses: tomlf_build_keyval, tomlf_constants, tomlf_datetime, tomlf_error, tomlf_type

interface set_value#
subroutine set_elem_value_string(array, pos, val, stat, origin)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • integer, intent(in) :: pos

  • character (tfc), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_elem_value_float_sp(array, pos, val, stat, origin)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • integer, intent(in) :: pos

  • real (tf_sp), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_elem_value_float_dp(array, pos, val, stat, origin)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • integer, intent(in) :: pos

  • real (tf_dp), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_elem_value_int_i1(array, pos, val, stat, origin)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • integer, intent(in) :: pos

  • integer (tf_i1), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_elem_value_int_i2(array, pos, val, stat, origin)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • integer, intent(in) :: pos

  • integer (tf_i2), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_elem_value_int_i4(array, pos, val, stat, origin)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • integer, intent(in) :: pos

  • integer (tf_i4), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_elem_value_int_i8(array, pos, val, stat, origin)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • integer, intent(in) :: pos

  • integer (tf_i8), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_elem_value_bool(array, pos, val, stat, origin)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • integer, intent(in) :: pos

  • logical, intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_elem_value_datetime(array, pos, val, stat, origin)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • integer, intent(in) :: pos

  • type (toml_datetime), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_array_value_float_sp(array, val, stat, origin)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • real (tf_sp), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_array_value_float_dp(array, val, stat, origin)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • real (tf_dp), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_array_value_int_i1(array, val, stat, origin)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • integer (tf_i1), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_array_value_int_i2(array, val, stat, origin)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • integer (tf_i2), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_array_value_int_i4(array, val, stat, origin)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • integer (tf_i4), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_array_value_int_i8(array, val, stat, origin)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • integer (tf_i8), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_array_value_bool(array, val, stat, origin)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • logical, intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_array_value_datetime(array, val, stat, origin)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • type (toml_datetime), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

interface get_value#
subroutine get_elem_table(array, pos, ptr, stat, origin)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • integer, intent(in) :: pos

  • type (toml_table), intent(out), pointer :: ptr

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_elem_array(array, pos, ptr, stat, origin)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • integer, intent(in) :: pos

  • type (toml_array), intent(out), pointer :: ptr

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_elem_keyval(array, pos, ptr, stat, origin)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • integer, intent(in) :: pos

  • type (toml_keyval), intent(out), pointer :: ptr

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_elem_value_string(array, pos, val, stat, origin)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • integer, intent(in) :: pos

  • character (tfc), intent(out), allocatable :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_elem_value_float_sp(array, pos, val, stat, origin)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • integer, intent(in) :: pos

  • real (tf_sp), intent(out) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_elem_value_float_dp(array, pos, val, stat, origin)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • integer, intent(in) :: pos

  • real (tf_dp), intent(out) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_elem_value_int_i1(array, pos, val, stat, origin)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • integer, intent(in) :: pos

  • integer (tf_i1), intent(out) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_elem_value_int_i2(array, pos, val, stat, origin)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • integer, intent(in) :: pos

  • integer (tf_i2), intent(out) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_elem_value_int_i4(array, pos, val, stat, origin)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • integer, intent(in) :: pos

  • integer (tf_i4), intent(out) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_elem_value_int_i8(array, pos, val, stat, origin)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • integer, intent(in) :: pos

  • integer (tf_i8), intent(out) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_elem_value_bool(array, pos, val, stat, origin)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • integer, intent(in) :: pos

  • logical, intent(out) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_elem_value_datetime(array, pos, val, stat, origin)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • integer, intent(in) :: pos

  • type (toml_datetime), intent(out) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_array_value_float_sp(array, val, stat, origin)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • real (tf_sp), intent(out), allocatable :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_array_value_float_dp(array, val, stat, origin)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • real (tf_dp), intent(out), allocatable :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_array_value_int_i1(array, val, stat, origin)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • integer (tf_i1), intent(out), allocatable :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_array_value_int_i2(array, val, stat, origin)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • integer (tf_i2), intent(out), allocatable :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_array_value_int_i4(array, val, stat, origin)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • integer (tf_i4), intent(out), allocatable :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_array_value_int_i8(array, val, stat, origin)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • integer (tf_i8), intent(out), allocatable :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_array_value_bool(array, val, stat, origin)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • logical, intent(out), allocatable :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_array_value_datetime(array, val, stat, origin)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • type (toml_datetime), intent(out), allocatable :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

module tomlf_build_keyval#

Uses: tomlf_constants, tomlf_datetime, tomlf_error, tomlf_type, tomlf_utils

parameter buffersize = 128#

Type: integer

interface set_value#
subroutine set_value_float_sp(self, val, stat, origin)#

Arguments:

  • class (toml_keyval), intent(inout) :: self

  • real (tf_sp), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_value_float_dp(self, val, stat, origin)#

Arguments:

  • class (toml_keyval), intent(inout) :: self

  • real (tf_dp), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_value_integer_i1(self, val, stat, origin)#

Arguments:

  • class (toml_keyval), intent(inout) :: self

  • integer (tf_i1), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_value_integer_i2(self, val, stat, origin)#

Arguments:

  • class (toml_keyval), intent(inout) :: self

  • integer (tf_i2), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_value_integer_i4(self, val, stat, origin)#

Arguments:

  • class (toml_keyval), intent(inout) :: self

  • integer (tf_i4), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_value_integer_i8(self, val, stat, origin)#

Arguments:

  • class (toml_keyval), intent(inout) :: self

  • integer (tf_i8), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_value_bool(self, val, stat, origin)#

Arguments:

  • class (toml_keyval), intent(inout) :: self

  • logical, intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_value_datetime(self, val, stat, origin)#

Arguments:

  • class (toml_keyval), intent(inout) :: self

  • type (toml_datetime), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_value_string(self, val, stat, origin)#

Arguments:

  • class (toml_keyval), intent(inout) :: self

  • character (tfc), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

interface get_value#
subroutine get_value_float_sp(self, val, stat, origin)#

Arguments:

  • class (toml_keyval), intent(in) :: self

  • real (tf_sp), intent(out) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_value_float_dp(self, val, stat, origin)#

Arguments:

  • class (toml_keyval), intent(in) :: self

  • real (tf_dp), intent(out) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_value_integer_i1(self, val, stat, origin)#

Arguments:

  • class (toml_keyval), intent(in) :: self

  • integer (tf_i1), intent(out) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_value_integer_i2(self, val, stat, origin)#

Arguments:

  • class (toml_keyval), intent(in) :: self

  • integer (tf_i2), intent(out) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_value_integer_i4(self, val, stat, origin)#

Arguments:

  • class (toml_keyval), intent(in) :: self

  • integer (tf_i4), intent(out) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_value_integer_i8(self, val, stat, origin)#

Arguments:

  • class (toml_keyval), intent(in) :: self

  • integer (tf_i8), intent(out) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_value_bool(self, val, stat, origin)#

Arguments:

  • class (toml_keyval), intent(in) :: self

  • logical, intent(out) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_value_datetime(self, val, stat, origin)#

Arguments:

  • class (toml_keyval), intent(in) :: self

  • type (toml_datetime), intent(out) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_value_string(self, val, stat, origin)#

Arguments:

  • class (toml_keyval), intent(in) :: self

  • character (tfc), intent(out), allocatable :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

module tomlf_build_merge#

Uses: tomlf_constants, tomlf_type

parameter merge_policy = enum_policy()#

Type: type (enum_policy)

type enum_policy#
member overwrite = 1#

Type: integer

member preserve = 2#

Type: integer

member append = 3#

Type: integer

type toml_merge_config#
member table = merge_policy%append#

Type: integer

member array = merge_policy%preserve#

Type: integer

member keyval = merge_policy%preserve#

Type: integer

Constructors:

pure function new_merge_config(table, array, keyval)#

Arguments:

  • character(len=*), intent(in), optional :: table

  • character(len=*), intent(in), optional :: array

  • character(len=*), intent(in), optional :: keyval

Returns: type (toml_merge_config)

recursive subroutine merge_table(lhs, rhs, config)#

Arguments:

recursive subroutine merge_array(lhs, rhs)#

Arguments:

module tomlf_build_path#

Uses: tomlf_build_table, tomlf_constants, tomlf_datetime, tomlf_error, tomlf_type

type toml_path#
member path#

Type: type (toml_key), allocatable

Constructors:

pure function new_path2(key1, key2)#

Arguments:

  • character(len=*), intent(in) :: key1

  • character(len=*), intent(in) :: key2

Returns: type (toml_path)

pure function new_path3(key1, key2, key3)#

Arguments:

  • character (tfc), intent(in) :: key1

  • character (tfc), intent(in) :: key2

  • character (tfc), intent(in) :: key3

Returns: type (toml_path)

pure function new_path4(key1, key2, key3, key4)#

Arguments:

  • character (tfc), intent(in) :: key1

  • character (tfc), intent(in) :: key2

  • character (tfc), intent(in) :: key3

  • character (tfc), intent(in) :: key4

Returns: type (toml_path)

interface set_value#
subroutine set_path_value_float_sp(table, path, val, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_path), intent(in) :: path

  • real (tf_sp), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_path_value_float_dp(table, path, val, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_path), intent(in) :: path

  • real (tf_dp), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_path_value_integer_i1(table, path, val, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_path), intent(in) :: path

  • integer (tf_i1), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_path_value_integer_i2(table, path, val, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_path), intent(in) :: path

  • integer (tf_i2), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_path_value_integer_i4(table, path, val, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_path), intent(in) :: path

  • integer (tf_i4), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_path_value_integer_i8(table, path, val, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_path), intent(in) :: path

  • integer (tf_i8), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_path_value_bool(table, path, val, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_path), intent(in) :: path

  • logical, intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_path_value_datetime(table, path, val, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_path), intent(in) :: path

  • type (toml_datetime), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_path_value_string(table, path, val, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_path), intent(in) :: path

  • character (tfc), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

interface get_value#
subroutine get_path_table(table, path, ptr, requested, stat, origin)#

Arguments:

  • class (toml_table), intent(inout), target :: table

  • type (toml_path), intent(in) :: path

  • type (toml_table), intent(out), pointer :: ptr

  • logical, intent(in), optional :: requested

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_path_array(table, path, ptr, requested, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_path), intent(in) :: path

  • type (toml_array), intent(out), pointer :: ptr

  • logical, intent(in), optional :: requested

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_path_keyval(table, path, ptr, requested, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_path), intent(in) :: path

  • type (toml_keyval), intent(out), pointer :: ptr

  • logical, intent(in), optional :: requested

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_path_value_float_sp(table, path, val, default, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_path), intent(in) :: path

  • real (tf_sp), intent(out) :: val

  • real (tf_sp), intent(in), optional :: default

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_path_value_float_dp(table, path, val, default, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_path), intent(in) :: path

  • real (tf_dp), intent(out) :: val

  • real (tf_dp), intent(in), optional :: default

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_path_value_integer_i1(table, path, val, default, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_path), intent(in) :: path

  • integer (tf_i1), intent(out) :: val

  • integer (tf_i1), intent(in), optional :: default

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_path_value_integer_i2(table, path, val, default, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_path), intent(in) :: path

  • integer (tf_i2), intent(out) :: val

  • integer (tf_i2), intent(in), optional :: default

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_path_value_integer_i4(table, path, val, default, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_path), intent(in) :: path

  • integer (tf_i4), intent(out) :: val

  • integer (tf_i4), intent(in), optional :: default

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_path_value_integer_i8(table, path, val, default, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_path), intent(in) :: path

  • integer (tf_i8), intent(out) :: val

  • integer (tf_i8), intent(in), optional :: default

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_path_value_bool(table, path, val, default, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_path), intent(in) :: path

  • logical, intent(out) :: val

  • logical, intent(in), optional :: default

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_path_value_datetime(table, path, val, default, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_path), intent(in) :: path

  • type (toml_datetime), intent(out) :: val

  • type (toml_datetime), intent(in), optional :: default

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_path_value_string(table, path, val, default, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_path), intent(in) :: path

  • character (tfc), intent(out), allocatable :: val

  • character (tfc), intent(in), optional :: default

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine walk_path(table, path, ptr, requested, stat, origin)#

Arguments:

  • class (toml_table), intent(inout), target :: table

  • type (toml_path), intent(in) :: path

  • type (toml_table), intent(out), pointer :: ptr

  • logical, intent(in), optional :: requested

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

module tomlf_build_table#

Uses: tomlf_build_keyval, tomlf_constants, tomlf_datetime, tomlf_error, tomlf_type

interface set_value#
subroutine set_child_value_float_sp(table, key, val, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • character (tfc), intent(in) :: key

  • real (tf_sp), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_child_value_float_dp(table, key, val, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • character (tfc), intent(in) :: key

  • real (tf_dp), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_child_value_integer_i1(table, key, val, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • character (tfc), intent(in) :: key

  • integer (tf_i1), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_child_value_integer_i2(table, key, val, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • character (tfc), intent(in) :: key

  • integer (tf_i2), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_child_value_integer_i4(table, key, val, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • character (tfc), intent(in) :: key

  • integer (tf_i4), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_child_value_integer_i8(table, key, val, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • character (tfc), intent(in) :: key

  • integer (tf_i8), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_child_value_bool(table, key, val, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • character (tfc), intent(in) :: key

  • logical, intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_child_value_datetime(table, key, val, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • character (tfc), intent(in) :: key

  • type (toml_datetime), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_child_value_string(table, key, val, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • character (tfc), intent(in) :: key

  • character (tfc), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_key_value_float_sp(table, key, val, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_key), intent(in) :: key

  • real (tf_sp), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_key_value_float_dp(table, key, val, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_key), intent(in) :: key

  • real (tf_dp), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_key_value_integer_i1(table, key, val, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_key), intent(in) :: key

  • integer (tf_i1), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_key_value_integer_i2(table, key, val, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_key), intent(in) :: key

  • integer (tf_i2), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_key_value_integer_i4(table, key, val, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_key), intent(in) :: key

  • integer (tf_i4), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_key_value_integer_i8(table, key, val, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_key), intent(in) :: key

  • integer (tf_i8), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_key_value_bool(table, key, val, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_key), intent(in) :: key

  • logical, intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_key_value_datetime(table, key, val, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_key), intent(in) :: key

  • type (toml_datetime), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine set_key_value_string(table, key, val, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_key), intent(in) :: key

  • character (tfc), intent(in) :: val

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

interface get_value#
subroutine get_child_table(table, key, ptr, requested, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • character (tfc), intent(in) :: key

  • type (toml_table), intent(out), pointer :: ptr

  • logical, intent(in), optional :: requested

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_child_array(table, key, ptr, requested, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • character (tfc), intent(in) :: key

  • type (toml_array), intent(out), pointer :: ptr

  • logical, intent(in), optional :: requested

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_child_keyval(table, key, ptr, requested, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • character (tfc), intent(in) :: key

  • type (toml_keyval), intent(out), pointer :: ptr

  • logical, intent(in), optional :: requested

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_child_value_float_sp(table, key, val, default, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • character (tfc), intent(in) :: key

  • real (tf_sp), intent(out) :: val

  • real (tf_sp), intent(in), optional :: default

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_child_value_float_dp(table, key, val, default, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • character (tfc), intent(in) :: key

  • real (tf_dp), intent(out) :: val

  • real (tf_dp), intent(in), optional :: default

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_child_value_integer_i1(table, key, val, default, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • character (tfc), intent(in) :: key

  • integer (tf_i1), intent(out) :: val

  • integer (tf_i1), intent(in), optional :: default

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_child_value_integer_i2(table, key, val, default, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • character (tfc), intent(in) :: key

  • integer (tf_i2), intent(out) :: val

  • integer (tf_i2), intent(in), optional :: default

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_child_value_integer_i4(table, key, val, default, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • character (tfc), intent(in) :: key

  • integer (tf_i4), intent(out) :: val

  • integer (tf_i4), intent(in), optional :: default

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_child_value_integer_i8(table, key, val, default, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • character (tfc), intent(in) :: key

  • integer (tf_i8), intent(out) :: val

  • integer (tf_i8), intent(in), optional :: default

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_child_value_bool(table, key, val, default, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • character (tfc), intent(in) :: key

  • logical, intent(out) :: val

  • logical, intent(in), optional :: default

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_child_value_datetime(table, key, val, default, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • character (tfc), intent(in) :: key

  • type (toml_datetime), intent(out) :: val

  • type (toml_datetime), intent(in), optional :: default

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_child_value_string(table, key, val, default, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • character (tfc), intent(in) :: key

  • character (tfc), intent(out), allocatable :: val

  • character (tfc), intent(in), optional :: default

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_key_table(table, key, ptr, requested, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_key), intent(in) :: key

  • type (toml_table), intent(out), pointer :: ptr

  • logical, intent(in), optional :: requested

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_key_array(table, key, ptr, requested, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_key), intent(in) :: key

  • type (toml_array), intent(out), pointer :: ptr

  • logical, intent(in), optional :: requested

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_key_keyval(table, key, ptr, requested, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_key), intent(in) :: key

  • type (toml_keyval), intent(out), pointer :: ptr

  • logical, intent(in), optional :: requested

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_key_value_float_sp(table, key, val, default, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_key), intent(in) :: key

  • real (tf_sp), intent(out) :: val

  • real (tf_sp), intent(in), optional :: default

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_key_value_float_dp(table, key, val, default, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_key), intent(in) :: key

  • real (tf_dp), intent(out) :: val

  • real (tf_dp), intent(in), optional :: default

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_key_value_integer_i1(table, key, val, default, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_key), intent(in) :: key

  • integer (tf_i1), intent(out) :: val

  • integer (tf_i1), intent(in), optional :: default

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_key_value_integer_i2(table, key, val, default, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_key), intent(in) :: key

  • integer (tf_i2), intent(out) :: val

  • integer (tf_i2), intent(in), optional :: default

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_key_value_integer_i4(table, key, val, default, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_key), intent(in) :: key

  • integer (tf_i4), intent(out) :: val

  • integer (tf_i4), intent(in), optional :: default

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_key_value_integer_i8(table, key, val, default, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_key), intent(in) :: key

  • integer (tf_i8), intent(out) :: val

  • integer (tf_i8), intent(in), optional :: default

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_key_value_bool(table, key, val, default, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_key), intent(in) :: key

  • logical, intent(out) :: val

  • logical, intent(in), optional :: default

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_key_value_datetime(table, key, val, default, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_key), intent(in) :: key

  • type (toml_datetime), intent(out) :: val

  • type (toml_datetime), intent(in), optional :: default

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

subroutine get_key_value_string(table, key, val, default, stat, origin)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_key), intent(in) :: key

  • character (tfc), intent(out), allocatable :: val

  • character (tfc), intent(in), optional :: default

  • integer, intent(out), optional :: stat

  • integer, intent(out), optional :: origin

module tomlf_constants#

Uses: iso_fortran_env

parameter tf_sp = selected_real_kind(6)#

Type: integer

parameter tf_dp = selected_real_kind(15)#

Type: integer

parameter tf_i1 = selected_int_kind(2)#

Type: integer

parameter tf_i2 = selected_int_kind(4)#

Type: integer

parameter tf_i4 = selected_int_kind(9)#

Type: integer

parameter tf_i8 = selected_int_kind(18)#

Type: integer

parameter tfc = selected_char_kind('DEFAULT')#

Type: integer

parameter tfr = tf_dp#

Type: integer

parameter tfi = tf_i8#

Type: integer

parameter tfout = output_unit#

Type: integer

parameter toml_escape = enum_escape()#

Type: type (enum_escape)

parameter toml_type = enum_type()#

Type: type (enum_type)

parameter TOML_SQUOTE = "'"#

Type: character (tfc)

parameter TOML_DQUOTE = '"'#

Type: character (tfc)

parameter TOML_NEWLINE = new_line('a')#

Type: character (tfc)

parameter TOML_TABULATOR = achar(9)#

Type: character (tfc)

parameter TOML_FORMFEED = achar(12)#

Type: character (tfc)

parameter TOML_CARRIAGE_RETURN = achar(13)#

Type: character (tfc)

parameter TOML_BACKSPACE = achar(8)#

Type: character (tfc)

parameter TOML_ESC = achar(27)#

Type: character (tfc)

parameter TOML_LOWERCASE = 'abcdefghijklmnopqrstuvwxyz'#

Type: character (tfc)

parameter TOML_UPPERCASE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'#

Type: character (tfc)

parameter TOML_LETTERS = TOML_LOWERCASE//TOML_UPPERCASE#

Type: character (tfc)

parameter TOML_WHITESPACE = ' '//toml_escape%tabulator#

Type: character (tfc)

parameter TOML_DIGITS = '0123456789'#

Type: character (tfc)

parameter TOML_BINDIGITS = '01'#

Type: character (tfc)

parameter TOML_OCTDIGITS = '01234567'#

Type: character (tfc)

parameter TOML_HEXDIGITS = '0123456789ABCDEFabcdef'#

Type: character (tfc)

parameter TOML_TIMESTAMP = TOML_DIGITS//'.:+-T Zz'#

Type: character (tfc)

parameter TOML_BAREKEY = TOML_LETTERS//TOML_DIGITS//'_-'#

Type: character (tfc)

parameter TOML_LITERALS = TOML_LETTERS//TOML_DIGITS//'_-+.'#

Type: character (tfc)

type enum_escape#
member backslash = tfc_'\'#

Type: character (tfc)

member dquote = tfc_'"'#

Type: character (tfc)

member squote = tfc_''''#

Type: character (tfc)

member newline = achar(10, kind=tfc)#

Type: character (tfc)

member formfeed = achar(12, kind=tfc)#

Type: character (tfc)

member carriage_return = achar(13, kind=tfc)#

Type: character (tfc)

member bspace = achar(8, kind=tfc)#

Type: character (tfc)

member tabulator = achar(9, kind=tfc)#

Type: character (tfc)

type enum_type#
member invalid = 100#

Type: integer

member string = 101#

Type: integer

member boolean = 102#

Type: integer

member int = 103#

Type: integer

member float = 104#

Type: integer

member datetime = 105#

Type: integer

module tomlf_datetime#

Uses: tomlf_constants

type toml_time#
member hour = -1#

Type: integer

member minute = -1#

Type: integer

member second = -1#

Type: integer

member msec = -1#

Type: integer

member zone#

Type: character(len=:), allocatable

Constructors:

elemental function new_toml_time(hour, minute, second, msec, zone)#

Arguments:

  • integer, intent(in), optional :: hour

  • integer, intent(in), optional :: minute

  • integer, intent(in), optional :: second

  • integer, intent(in), optional :: msec

  • character(len=*), intent(in), optional :: zone

Returns: type (toml_time)

type toml_date#
member year = -1#

Type: integer

member month = -1#

Type: integer

member day = -1#

Type: integer

type toml_datetime#
member date#

Type: type (toml_date)

member time#

Type: type (toml_time)

Constructors:

pure function new_datetime(year, month, day, hour, minute, second, msecond, zone)#

Arguments:

  • integer, intent(in), optional :: year

  • integer, intent(in), optional :: month

  • integer, intent(in), optional :: day

  • integer, intent(in), optional :: hour

  • integer, intent(in), optional :: minute

  • integer, intent(in), optional :: second

  • integer, intent(in), optional :: msecond

  • character(len=*), intent(in), optional :: zone

Returns: type (toml_datetime)

pure function new_datetime_from_string(string)#

Arguments:

  • character(len=*), intent(in) :: string

Returns: type (toml_datetime)

interface operator(==)#
pure function compare_datetime(lhs, rhs)#

Arguments:

Returns: logical

interface to_string#
pure function to_string_datetime(datetime)#

Arguments:

Returns: character (tfc), allocatable

pure function to_string_date(date)#

Arguments:

Returns: character (tfc), allocatable

pure function to_string_time(time)#

Arguments:

Returns: character (tfc), allocatable

pure function has_date(datetime)#

Arguments:

Returns: logical

pure function has_time(datetime)#

Arguments:

Returns: logical

pure function compare_date(lhs, rhs)#

Arguments:

Returns: logical

pure function compare_time(lhs, rhs)#

Arguments:

Returns: logical

module tomlf_de#

Uses: tomlf_constants, tomlf_de_context, tomlf_de_lexer, tomlf_de_parser, tomlf_diagnostic, tomlf_error, tomlf_type

interface toml_parse#
subroutine toml_parse_unit(table, unit, error)#

Arguments:

  • type (toml_table), intent(out), allocatable :: table

  • integer, intent(in) :: unit

  • type (toml_error), intent(out), optional, allocatable :: error

subroutine toml_parse_string(table, string, error)#

Arguments:

  • type (toml_table), intent(out), allocatable :: table

  • character(len=*), intent(in), target :: string

  • type (toml_error), intent(out), optional, allocatable :: error

interface toml_load#
subroutine toml_load_file(table, filename, config, context, error)#

Arguments:

  • type (toml_table), intent(out), allocatable :: table

  • character (tfc), intent(in) :: filename

  • type (toml_parser_config), intent(in), optional :: config

  • type (toml_context), intent(out), optional :: context

  • type (toml_error), intent(out), optional, allocatable :: error

subroutine toml_load_unit(table, io, config, context, error)#

Arguments:

  • type (toml_table), intent(out), allocatable :: table

  • integer, intent(in) :: io

  • type (toml_parser_config), intent(in), optional :: config

  • type (toml_context), intent(out), optional :: context

  • type (toml_error), intent(out), optional, allocatable :: error

interface toml_loads#
subroutine toml_load_string(table, string, config, context, error)#

Arguments:

  • type (toml_table), intent(out), allocatable :: table

  • character (tfc), intent(in) :: string

  • type (toml_parser_config), intent(in), optional :: config

  • type (toml_context), intent(out), optional :: context

  • type (toml_error), intent(out), optional, allocatable :: error

module tomlf_de_abc#

Uses: tomlf_constants, tomlf_datetime, tomlf_de_token

type abstract_lexer#
procedure next#
procedure extract#
procedure extract_string#
procedure extract_integer#
procedure extract_float#
procedure extract_bool#
procedure extract_datetime#
procedure get_info#
module tomlf_de_context#

Uses: tomlf_constants, tomlf_de_token, tomlf_diagnostic, tomlf_terminal

type toml_context#
member filename#

Type: character (tfc), allocatable

member source#

Type: character (tfc), allocatable

member token#

Type: type (toml_token), allocatable

member top = 0#

Type: integer

procedure push_back#

Binds to: push_back

procedure report#

Binds to: report1, report2

procedure report1#

Binds to: report1

procedure report2#

Binds to: report2

pure function report1(self, message, origin, label, level, color)#

Arguments:

  • class (toml_context), intent(in) :: self

  • character (tfc), intent(in) :: message

  • integer, intent(in) :: origin

  • character (tfc), intent(in), optional :: label

  • integer, intent(in), optional :: level

  • type (toml_terminal), intent(in), optional :: color

Returns: character (tfc), allocatable

pure function report2(self, message, origin1, origin2, label1, label2, level1, level2, color)#

Arguments:

  • class (toml_context), intent(in) :: self

  • character (tfc), intent(in) :: message

  • integer, intent(in) :: origin1

  • integer, intent(in) :: origin2

  • character (tfc), intent(in), optional :: label1

  • character (tfc), intent(in), optional :: label2

  • integer, intent(in), optional :: level1

  • integer, intent(in), optional :: level2

  • type (toml_terminal), intent(in), optional :: color

Returns: character (tfc), allocatable

subroutine push_back(self, token)#

Arguments:

module tomlf_de_lexer#

Uses: tomlf_constants, tomlf_datetime, tomlf_de_abc, tomlf_de_context, tomlf_de_token, tomlf_error, tomlf_utils

parameter char_kind = enum_char()#

Type: type (enum_char)

parameter terminated = char_kind%space//char_kind%tab//char_kind%newline//char_kind...#

Type: character (tfc)

parameter lexer_scope = enum_scope()#

Type: type (enum_scope)

type enum_char#
member space = tfc_" "#

Type: character (tfc)

member hash = tfc_"#"#

Type: character (tfc)

member squote = tfc_"'"#

Type: character (tfc)

member squote3 = repeat(tfc_"'", 3)#

Type: character (tfc)

member dquote = tfc_""""#

Type: character (tfc)

member dquote3 = repeat(tfc_"""", 3)#

Type: character (tfc)

member backslash = tfc_"\"#

Type: character (tfc)

member dot = tfc_"."#

Type: character (tfc)

member comma = tfc_","#

Type: character (tfc)

member equal = tfc_"="#

Type: character (tfc)

member lbrace = tfc_"{"#

Type: character (tfc)

member rbrace = tfc_"}"#

Type: character (tfc)

member lbracket = tfc_"["#

Type: character (tfc)

member rbracket = tfc_"]"#

Type: character (tfc)

member newline = achar(10, kind=tfc)#

Type: character (tfc)

member formfeed = achar(12, kind=tfc)#

Type: character (tfc)

member carriage_return = achar(13, kind=tfc)#

Type: character (tfc)

member bspace = achar(8, kind=tfc)#

Type: character (tfc)

member tab = achar(9, kind=tfc)#

Type: character (tfc)

member plus = tfc_"+"#

Type: character (tfc)

member minus = tfc_"-"#

Type: character (tfc)

member literal = tfc_"0123456789-_"#

Type: character (tfc)

type enum_scope#
member table = 1#

Type: integer

member equal = 2#

Type: integer

member array = 3#

Type: integer

type stack_item#
member scope#

Type: integer

member token#

Type: integer

type toml_lexer, extends(abstract_lexer)#
member filename#

Type: character(len=:), allocatable

member pos = 0#

Type: integer

member chunk#

Type: character (tfc), allocatable

member top = 0#

Type: integer

member stack#

Type: type (stack_item), allocatable

member buffer = 0#

Type: integer

member context#

Type: type (toml_context)

procedure next#

Binds to: next

procedure extract_string#

Binds to: extract_string

procedure extract_integer#

Binds to: extract_integer

procedure extract_float#

Binds to: extract_float

procedure extract_bool#

Binds to: extract_bool

procedure extract_datetime#

Binds to: extract_datetime

procedure get_info#

Binds to: get_info

interface resize#
pure subroutine resize_scope(var, n)#

Arguments:

  • type (stack_item), intent(inout), allocatable :: var

  • integer, intent(in), optional :: n

pure function valid_string(ch)#

Arguments:

  • character (tfc), intent(in) :: ch

Returns: logical

pure function valid_date(string)#

Arguments:

  • character (tfc), intent(in) :: string

Returns: logical

function valid_local(string)#

Arguments:

  • character (tfc), intent(in) :: string

Returns: logical

elemental function peek(lexer, pos)#

Arguments:

  • type (toml_lexer), intent(in) :: lexer

  • integer, intent(in) :: pos

Returns: character (tfc)

elemental function match(lexer, pos, kind)#

Arguments:

  • type (toml_lexer), intent(in) :: lexer

  • integer, intent(in) :: pos

  • character (tfc), intent(in) :: kind

Returns: logical

pure function match_all(lexer, pos, kind)#

Arguments:

  • type (toml_lexer), intent(in) :: lexer

  • integer, intent(in) :: pos

  • character (tfc), intent(in) :: kind

Returns: logical

pure function strstr(string, pattern)#

Arguments:

  • character (tfc), intent(in) :: string

  • character (tfc), intent(in) :: pattern

Returns: integer

pure function view_scope(lexer)#

Arguments:

Returns: integer

function hex_to_int(hex)#

Arguments:

  • character (tfc), intent(in) :: hex

Returns: integer (tfi)

function verify_ucs(escape)#

Arguments:

  • character (tfc), intent(in) :: escape

Returns: logical

function convert_ucs(escape)#

Arguments:

  • character (tfc), intent(in) :: escape

Returns: character (tfc), allocatable

subroutine new_lexer_from_file(lexer, filename, error)#

Arguments:

  • type (toml_lexer), intent(out) :: lexer

  • character(len=*), intent(in) :: filename

  • type (toml_error), intent(out), allocatable :: error

subroutine new_lexer_from_unit(lexer, io, error)#

Arguments:

  • type (toml_lexer), intent(out) :: lexer

  • integer, intent(in) :: io

  • type (toml_error), intent(out), allocatable :: error

subroutine new_lexer_from_string(lexer, string)#

Arguments:

  • type (toml_lexer), intent(out) :: lexer

  • character (tfc), intent(in) :: string

subroutine next(lexer, token)#

Arguments:

subroutine fill_buffer(lexer)#

Arguments:

subroutine next_token(lexer, token)#

Arguments:

subroutine next_sstring(lexer, token)#

Arguments:

subroutine next_dstring(lexer, token)#

Arguments:

subroutine next_keypath(lexer, token)#

Arguments:

subroutine next_literal(lexer, token)#

Arguments:

subroutine next_integer(lexer, token)#

Arguments:

subroutine next_float(lexer, token)#

Arguments:

subroutine next_datetime(lexer, token)#

Arguments:

subroutine valid_time(string, valid, has_seconds)#

Arguments:

  • character (tfc), intent(in) :: string

  • logical, intent(out) :: valid

  • logical, intent(out) :: has_seconds

subroutine extract_string(lexer, token, string)#

Arguments:

  • class (toml_lexer), intent(in) :: lexer

  • type (toml_token), intent(in) :: token

  • character(len=:), intent(out), allocatable :: string

subroutine extract_integer(lexer, token, val)#

Arguments:

subroutine extract_float(lexer, token, val)#

Arguments:

subroutine extract_bool(lexer, token, val)#

Arguments:

  • class (toml_lexer), intent(in) :: lexer

  • type (toml_token), intent(in) :: token

  • logical, intent(out) :: val

subroutine extract_datetime(lexer, token, val)#

Arguments:

pure subroutine push_back(lexer, scope, token)#

Arguments:

  • type (toml_lexer), intent(inout) :: lexer

  • integer, intent(in) :: scope

  • integer, intent(in) :: token

subroutine pop(lexer, scope)#

Arguments:

  • type (toml_lexer), intent(inout) :: lexer

  • integer, intent(in) :: scope

subroutine get_info(lexer, meta, output)#

Arguments:

  • class (toml_lexer), intent(in) :: lexer

  • character (tfc), intent(in) :: meta

  • character (tfc), intent(out), allocatable :: output

module tomlf_de_parser#

Uses: tomlf_constants, tomlf_datetime, tomlf_de_context, tomlf_de_abc, tomlf_de_token, tomlf_diagnostic, tomlf_terminal, tomlf_error, tomlf_type

type toml_parser_config#
member color = toml_terminal()#

Type: type (toml_terminal)

member context_detail = 0#

Type: integer

Constructors:

pure function new_parser_config(color, context_detail)#

Arguments:

  • logical, intent(in), optional :: color

  • integer, intent(in), optional :: context_detail

Returns: type (toml_parser_config)

type toml_parser#
member token#

Type: type (toml_token)

member root#

Type: type (toml_table), allocatable

member current#

Type: type (toml_table), pointer

member diagnostic#

Type: type (toml_diagnostic), allocatable

member context#

Type: type (toml_context)

member config#

Type: type (toml_parser_config)

subroutine new_parser(parser, config)#

Arguments:

subroutine parse(lexer, table, config, context, error)#

Arguments:

subroutine parse_root(parser, lexer)#

Arguments:

subroutine parse_table_header(parser, lexer)#

Arguments:

recursive subroutine parse_keyval(parser, lexer, table)#

Arguments:

recursive subroutine parse_inline_array(parser, lexer, array)#

Arguments:

recursive subroutine parse_inline_table(parser, lexer, table)#

Arguments:

subroutine parse_value(parser, lexer, kval)#

Arguments:

subroutine consume(parser, lexer, kind)#

Arguments:

  • class (toml_parser), intent(inout) :: parser

  • class (toml_lexer), intent(inout) :: lexer

  • integer, intent(in) :: kind

subroutine syntax_error(diagnostic, lexer, token, message, label)#

Arguments:

  • type (toml_diagnostic), intent(out), allocatable :: diagnostic

  • class (toml_lexer), intent(inout) :: lexer

  • type (toml_token), intent(in) :: token

  • character(len=*), intent(in) :: message

  • character(len=*), intent(in) :: label

subroutine semantic_error(diagnostic, lexer, token1, token2, message, label1, label2)#

Arguments:

  • type (toml_diagnostic), intent(out), allocatable :: diagnostic

  • class (toml_lexer), intent(inout) :: lexer

  • type (toml_token), intent(in) :: token1

  • type (toml_token), intent(in) :: token2

  • character(len=*), intent(in) :: message

  • character(len=*), intent(in) :: label1

  • character(len=*), intent(in) :: label2

subroutine duplicate_key_error(diagnostic, lexer, token1, token2, message)#

Arguments:

  • type (toml_diagnostic), intent(out), allocatable :: diagnostic

  • class (toml_lexer), intent(inout) :: lexer

  • type (toml_token), intent(in) :: token1

  • type (toml_token), intent(in) :: token2

  • character(len=*), intent(in) :: message

subroutine make_error(error, diagnostic, lexer, color)#

Arguments:

subroutine next_token(parser, lexer)#

Arguments:

subroutine extract_key(parser, lexer, key)#

Arguments:

subroutine extract_value(parser, lexer, kval)#

Arguments:

subroutine get_table(table, key, ptr, stat)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_key), intent(in) :: key

  • type (toml_table), intent(out), pointer :: ptr

  • integer, intent(out), optional :: stat

module tomlf_de_token#
parameter token_kind = enum_token()#

Type: type (enum_token)

type enum_token#
member invalid = -1#

Type: integer

member eof = -2#

Type: integer

member unclosed = -3#

Type: integer

member whitespace = 0#

Type: integer

member newline = 1#

Type: integer

member comment = 2#

Type: integer

member dot = 3#

Type: integer

member comma = 4#

Type: integer

member equal = 5#

Type: integer

member lbrace = 6#

Type: integer

member rbrace = 7#

Type: integer

member lbracket = 8#

Type: integer

member rbracket = 9#

Type: integer

member string = 10#

Type: integer

member mstring = 11#

Type: integer

member literal = 12#

Type: integer

member mliteral = 13#

Type: integer

member keypath = 14#

Type: integer

member float = 15#

Type: integer

member int = 16#

Type: integer

member bool = 17#

Type: integer

member datetime = 18#

Type: integer

member nil = 19#

Type: integer

type toml_token#
member kind = token_kind%newline#

Type: integer

member first = 0#

Type: integer

member last = 0#

Type: integer

member chunk = 0#

Type: integer

interface resize#
pure subroutine resize_token(var, n)#

Arguments:

  • type (toml_token), intent(inout), allocatable :: var

  • integer, intent(in), optional :: n

pure function stringify(token)#

Arguments:

Returns: character(len=:), allocatable

module tomlf_diagnostic#

Uses: tomlf_terminal

parameter toml_level = level_enum()#

Type: type (level_enum)

parameter nl = new_line('a')#

Type: character(len=*)

type level_enum#
member error = 0#

Type: integer

member warning = 1#

Type: integer

member help = 2#

Type: integer

member note = 3#

Type: integer

member info = 4#

Type: integer

type toml_label#
member level#

Type: integer

member primary#

Type: logical

member first#

Type: integer

member last#

Type: integer

member text#

Type: character(len=:), allocatable

member source#

Type: character(len=:), allocatable

Constructors:

pure function new_label(level, first, last, text, primary)#

Arguments:

  • integer, intent(in) :: level

  • integer, intent(in) :: first

  • integer, intent(in) :: last

  • character(len=*), intent(in), optional :: text

  • logical, intent(in), optional :: primary

Returns: type (toml_label)

type toml_diagnostic#
member level#

Type: integer

member message#

Type: character(len=:), allocatable

member source#

Type: character(len=:), allocatable

member label#

Type: type (toml_label), allocatable

Constructors:

pure function new_diagnostic(level, message, source, label)#

Arguments:

  • integer, intent(in) :: level

  • character(len=*), intent(in), optional :: message

  • character(len=*), intent(in), optional :: source

  • type (toml_label), intent(in), optional :: label

Returns: type (toml_diagnostic)

type line_token#
member first#

Type: integer

member last#

Type: integer

interface render#
pure recursive function render_diagnostic(diag, input, color)#

Arguments:

Returns: character(len=:), allocatable

function render_text(input, color, source)#

Arguments:

  • character(len=*), intent(in) :: input

  • type (toml_terminal), intent(in) :: color

  • character(len=*), intent(in), optional :: source

Returns: character(len=:), allocatable

function render_text_with_label(input, label, color, source)#

Arguments:

  • character(len=*), intent(in) :: input

  • type (toml_label), intent(in) :: label

  • type (toml_terminal), intent(in) :: color

  • character(len=*), intent(in), optional :: source

Returns: character(len=:), allocatable

pure function render_text_with_labels(input, label, color, source)#

Arguments:

  • character(len=*), intent(in) :: input

  • type (toml_label), intent(in) :: label

  • type (toml_terminal), intent(in) :: color

  • character(len=*), intent(in), optional :: source

Returns: character(len=:), allocatable

pure function line_tokens(input)#

Arguments:

  • character(len=*), intent(in) :: input

Returns: type (line_token), allocatable

pure function render_message(level, message, color)#

Arguments:

  • integer, intent(in) :: level

  • character(len=*), intent(in), optional :: message

  • type (toml_terminal), intent(in) :: color

Returns: character(len=:), allocatable

pure function level_name(level, color)#

Arguments:

  • integer, intent(in) :: level

  • type (toml_terminal), intent(in) :: color

Returns: character(len=:), allocatable

pure function render_source(source, offset, color)#

Arguments:

  • character(len=*), intent(in) :: source

  • integer, intent(in) :: offset

  • type (toml_terminal), intent(in) :: color

Returns: character(len=:), allocatable

pure function render_label(label, shift, color)#

Arguments:

Returns: character(len=:), allocatable

pure function level_color(level, color)#

Arguments:

  • integer, intent(in) :: level

  • type (toml_terminal), intent(in) :: color

Returns: type (ansi_code)

pure function render_line(input, line, color)#

Arguments:

  • character(len=*), intent(in) :: input

  • character(len=*), intent(in) :: line

  • type (toml_terminal), intent(in) :: color

Returns: character(len=:), allocatable

pure function integer_width(input)#

Arguments:

  • integer, intent(in) :: input

Returns: integer

pure function to_string(val, width)#

Arguments:

  • integer, intent(in) :: val

  • integer, intent(in), optional :: width

Returns: character(len=:), allocatable

module tomlf_error#

Uses: tomlf_constants

parameter toml_stat = enum_stat()#

Type: type (enum_stat)

type enum_stat#
member success = 0#

Type: integer

member fatal = -1#

Type: integer

member duplicate_key = -2#

Type: integer

member type_mismatch = -3#

Type: integer

member conversion_error = -4#

Type: integer

member missing_key = -5#

Type: integer

type toml_error#
member stat = toml_stat%fatal#

Type: integer

member message#

Type: character (tfc), allocatable

subroutine make_error(error, message, stat)#

Arguments:

  • type (toml_error), intent(out), allocatable :: error

  • character (tfc), intent(in) :: message

  • integer, intent(in), optional :: stat

module tomlf_ser#

Uses: tomlf_constants, tomlf_datetime, tomlf_error, tomlf_type, tomlf_utils

parameter initial_size = 8#

Type: integer

type toml_ser_config#
member indent#

Type: character(len=:), allocatable

type toml_serializer, extends(toml_visitor)#
member output#

Type: character(len=:), allocatable

member config = toml_ser_config()#

Type: type (toml_ser_config)

member array_of_tables = .false.#

Type: logical

member inline_array = .false.#

Type: logical

member top = 0#

Type: integer

member stack#

Type: type (toml_key), allocatable

procedure visit#

Binds to: visit

Constructors:

function new_serializer_func(config)#

Arguments:

Returns: type (toml_serializer)

interface toml_dumps#
subroutine toml_dump_to_string(val, string, error, config)#

Arguments:

  • class (toml_value), intent(inout) :: val

  • character(len=:), intent(out), allocatable :: string

  • type (toml_error), intent(out), allocatable :: error

  • type (toml_ser_config), intent(in), optional :: config

interface toml_dump#
subroutine toml_dump_to_file(val, filename, error, config)#

Arguments:

  • class (toml_value), intent(inout) :: val

  • character(len=*), intent(in) :: filename

  • type (toml_error), intent(out), allocatable :: error

  • type (toml_ser_config), intent(in), optional :: config

subroutine toml_dump_to_unit(val, io, error, config)#

Arguments:

  • class (toml_value), intent(inout) :: val

  • integer, intent(in) :: io

  • type (toml_error), intent(out), allocatable :: error

  • type (toml_ser_config), intent(in), optional :: config

interface new#
subroutine new_serializer(self, config)#

Arguments:

function toml_serialize(val, config)#

Arguments:

Returns: character(len=:), allocatable

recursive subroutine visit(self, val)#

Arguments:

subroutine visit_keyval(visitor, keyval)#

Arguments:

recursive subroutine visit_array(visitor, array)#

Arguments:

recursive subroutine visit_table(visitor, table)#

Arguments:

subroutine resize(stack, n)#

Arguments:

  • type (toml_key), intent(inout), allocatable :: stack

  • integer, intent(in), optional :: n

module tomlf_structure#

Uses: tomlf_structure_list, tomlf_structure_map, tomlf_structure_array_list, tomlf_structure_ordered_map

subroutine new_list_structure(self)#

Arguments:

subroutine new_map_structure(self)#

Arguments:

module tomlf_structure_array_list#

Uses: tomlf_constants, tomlf_structure_list, tomlf_structure_node, tomlf_type_value

parameter initial_size = 16#

Type: integer

type toml_array_list, extends(toml_list_structure)#
member n = 0#

Type: integer

member lst#

Type: type (toml_node), allocatable

procedure get_len#

Binds to: get_len

procedure get#

Binds to: get

procedure push_back#

Binds to: push_back

procedure shift#

Binds to: shift

procedure pop#

Binds to: pop

procedure destroy#

Binds to: destroy

pure function get_len(self)#

Arguments:

Returns: integer

subroutine new_array_list(self, n)#

Arguments:

  • type (toml_array_list), intent(out) :: self

  • integer, intent(in), optional :: n

subroutine get(self, idx, ptr)#

Arguments:

  • class (toml_array_list), intent(inout), target :: self

  • integer, intent(in) :: idx

  • class (toml_value), intent(out), pointer :: ptr

subroutine push_back(self, val)#

Arguments:

subroutine shift(self, val)#

Arguments:

subroutine pop(self, val)#

Arguments:

subroutine destroy(self)#

Arguments:

module tomlf_structure_list#

Uses: tomlf_constants, tomlf_type_value

type toml_list_structure#
procedure get_len#
procedure push_back#
procedure shift#
procedure pop#
procedure get#
procedure destroy#
module tomlf_structure_map#

Uses: tomlf_constants, tomlf_type_value

type toml_map_structure#
procedure get#
procedure push_back#
procedure get_keys#
procedure pop#
procedure delete#
procedure destroy#
module tomlf_structure_node#

Uses: tomlf_type_value

parameter initial_size = 16#

Type: integer

type toml_node#
member val#

Type: class (toml_value), allocatable

subroutine resize(list, n)#

Arguments:

  • type (toml_node), intent(inout), allocatable, target :: list

  • integer, intent(in) :: n

module tomlf_structure_ordered_map#

Uses: tomlf_constants, tomlf_structure_map, tomlf_structure_node, tomlf_type_value

parameter initial_size = 16#

Type: integer

type toml_ordered_map, extends(toml_map_structure)#
member n = 0#

Type: integer

member lst#

Type: type (toml_node), allocatable

procedure get#

Binds to: get

procedure push_back#

Binds to: push_back

procedure pop#

Binds to: pop

procedure get_keys#

Binds to: get_keys

procedure delete#

Binds to: delete

procedure destroy#

Binds to: destroy

subroutine new_ordered_map(self, n)#

Arguments:

  • type (toml_ordered_map), intent(out) :: self

  • integer, intent(in), optional :: n

subroutine get(self, key, ptr)#

Arguments:

subroutine push_back(self, val)#

Arguments:

subroutine get_keys(self, list)#

Arguments:

subroutine pop(self, key, val)#

Arguments:

subroutine delete(self, key)#

Arguments:

subroutine destroy(self)#

Arguments:

module tomlf_terminal#

Uses: tomlf_utils

parameter i1 = selected_int_kind(2)#

Type: integer

parameter reset = ansi_code(style=0_i1)#

Type: type (ansi_code)

parameter bold = ansi_code(style=1_i1)#

Type: type (ansi_code)

parameter dim = ansi_code(style=2_i1)#

Type: type (ansi_code)

parameter italic = ansi_code(style=3_i1)#

Type: type (ansi_code)

parameter underline = ansi_code(style=4_i1)#

Type: type (ansi_code)

Type: type (ansi_code)

Type: type (ansi_code)

parameter reverse = ansi_code(style=7_i1)#

Type: type (ansi_code)

parameter hidden = ansi_code(style=8_i1)#

Type: type (ansi_code)

parameter crossed = ansi_code(style=9_i1)#

Type: type (ansi_code)

parameter black = ansi_code(fg=30_i1)#

Type: type (ansi_code)

parameter red = ansi_code(fg=31_i1)#

Type: type (ansi_code)

parameter green = ansi_code(fg=32_i1)#

Type: type (ansi_code)

parameter yellow = ansi_code(fg=33_i1)#

Type: type (ansi_code)

parameter blue = ansi_code(fg=34_i1)#

Type: type (ansi_code)

parameter magenta = ansi_code(fg=35_i1)#

Type: type (ansi_code)

parameter cyan = ansi_code(fg=36_i1)#

Type: type (ansi_code)

parameter white = ansi_code(fg=37_i1)#

Type: type (ansi_code)

parameter gray = ansi_code(fg=90_i1)#

Type: type (ansi_code)

parameter bright_red = ansi_code(fg=91_i1)#

Type: type (ansi_code)

parameter bright_green = ansi_code(fg=92_i1)#

Type: type (ansi_code)

parameter bright_yellow = ansi_code(fg=93_i1)#

Type: type (ansi_code)

parameter bright_blue = ansi_code(fg=94_i1)#

Type: type (ansi_code)

parameter bright_magenta = ansi_code(fg=95_i1)#

Type: type (ansi_code)

parameter bright_cyan = ansi_code(fg=96_i1)#

Type: type (ansi_code)

parameter bright_white = ansi_code(fg=97_i1)#

Type: type (ansi_code)

parameter bg_black = ansi_code(bg=40_i1)#

Type: type (ansi_code)

parameter bg_red = ansi_code(bg=41_i1)#

Type: type (ansi_code)

parameter bg_green = ansi_code(bg=42_i1)#

Type: type (ansi_code)

parameter bg_yellow = ansi_code(bg=43_i1)#

Type: type (ansi_code)

parameter bg_blue = ansi_code(bg=44_i1)#

Type: type (ansi_code)

parameter bg_magenta = ansi_code(bg=45_i1)#

Type: type (ansi_code)

parameter bg_cyan = ansi_code(bg=46_i1)#

Type: type (ansi_code)

parameter bg_white = ansi_code(bg=47_i1)#

Type: type (ansi_code)

parameter bg_gray = ansi_code(bg=100_i1)#

Type: type (ansi_code)

parameter bg_bright_red = ansi_code(bg=101_i1)#

Type: type (ansi_code)

parameter bg_bright_green = ansi_code(bg=102_i1)#

Type: type (ansi_code)

parameter bg_bright_yellow = ansi_code(bg=103_i1)#

Type: type (ansi_code)

parameter bg_bright_blue = ansi_code(bg=104_i1)#

Type: type (ansi_code)

parameter bg_bright_magenta = ansi_code(bg=105_i1)#

Type: type (ansi_code)

parameter bg_bright_cyan = ansi_code(bg=106_i1)#

Type: type (ansi_code)

parameter bg_bright_white = ansi_code(bg=107_i1)#

Type: type (ansi_code)

type ansi_code#
member style = -1_i1#

Type: integer (i1)

member bg = -1_i1#

Type: integer (i1)

member fg = -1_i1#

Type: integer (i1)

type toml_terminal#
member reset = ansi_code()#

Type: type (ansi_code)

member bold = ansi_code()#

Type: type (ansi_code)

member dim = ansi_code()#

Type: type (ansi_code)

member italic = ansi_code()#

Type: type (ansi_code)

member underline = ansi_code()#

Type: type (ansi_code)

Type: type (ansi_code)

Type: type (ansi_code)

member reverse = ansi_code()#

Type: type (ansi_code)

member hidden = ansi_code()#

Type: type (ansi_code)

member crossed = ansi_code()#

Type: type (ansi_code)

member black = ansi_code()#

Type: type (ansi_code)

member red = ansi_code()#

Type: type (ansi_code)

member green = ansi_code()#

Type: type (ansi_code)

member yellow = ansi_code()#

Type: type (ansi_code)

member blue = ansi_code()#

Type: type (ansi_code)

member magenta = ansi_code()#

Type: type (ansi_code)

member cyan = ansi_code()#

Type: type (ansi_code)

member white = ansi_code()#

Type: type (ansi_code)

member gray = ansi_code()#

Type: type (ansi_code)

member bright_red = ansi_code()#

Type: type (ansi_code)

member bright_green = ansi_code()#

Type: type (ansi_code)

member bright_yellow = ansi_code()#

Type: type (ansi_code)

member bright_blue = ansi_code()#

Type: type (ansi_code)

member bright_magenta = ansi_code()#

Type: type (ansi_code)

member bright_cyan = ansi_code()#

Type: type (ansi_code)

member bright_white = ansi_code()#

Type: type (ansi_code)

member bg_black = ansi_code()#

Type: type (ansi_code)

member bg_red = ansi_code()#

Type: type (ansi_code)

member bg_green = ansi_code()#

Type: type (ansi_code)

member bg_yellow = ansi_code()#

Type: type (ansi_code)

member bg_blue = ansi_code()#

Type: type (ansi_code)

member bg_magenta = ansi_code()#

Type: type (ansi_code)

member bg_cyan = ansi_code()#

Type: type (ansi_code)

member bg_white = ansi_code()#

Type: type (ansi_code)

member bg_gray = ansi_code()#

Type: type (ansi_code)

member bg_bright_red = ansi_code()#

Type: type (ansi_code)

member bg_bright_green = ansi_code()#

Type: type (ansi_code)

member bg_bright_yellow = ansi_code()#

Type: type (ansi_code)

member bg_bright_blue = ansi_code()#

Type: type (ansi_code)

member bg_bright_magenta = ansi_code()#

Type: type (ansi_code)

member bg_bright_cyan = ansi_code()#

Type: type (ansi_code)

member bg_bright_white = ansi_code()#

Type: type (ansi_code)

Constructors:

pure function new_terminal(use_color)#

Arguments:

  • logical, intent(in) :: use_color

Returns: type (toml_terminal)

interface operator(+)#
pure function add(lval, rval)#

Arguments:

Returns: type (ansi_code)

interface operator(//)#
pure function concat_left(lval, code)#

Arguments:

  • character(len=*), intent(in) :: lval

  • type (ansi_code), intent(in) :: code

Returns: character(len=:), allocatable

pure function concat_right(code, rval)#

Arguments:

  • type (ansi_code), intent(in) :: code

  • character(len=*), intent(in) :: rval

Returns: character(len=:), allocatable

interface escape#
pure function escape(code)#

Arguments:

Returns: character(len=:), allocatable

pure function anycolor(code)#

Arguments:

Returns: logical

module tomlf_type#

Uses: tomlf_constants, tomlf_error, tomlf_type_array, tomlf_type_keyval, tomlf_type_table, tomlf_type_value

interface add_table#
subroutine add_table_to_table(table, key, ptr, stat)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • character (tfc), intent(in) :: key

  • type (toml_table), intent(out), pointer :: ptr

  • integer, intent(out), optional :: stat

subroutine add_table_to_table_key(table, key, ptr, stat)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_key), intent(in) :: key

  • type (toml_table), intent(out), pointer :: ptr

  • integer, intent(out), optional :: stat

subroutine add_table_to_array(array, ptr, stat)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • type (toml_table), intent(out), pointer :: ptr

  • integer, intent(out), optional :: stat

interface add_array#
subroutine add_array_to_table(table, key, ptr, stat)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • character (tfc), intent(in) :: key

  • type (toml_array), intent(out), pointer :: ptr

  • integer, intent(out), optional :: stat

subroutine add_array_to_table_key(table, key, ptr, stat)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_key), intent(in) :: key

  • type (toml_array), intent(out), pointer :: ptr

  • integer, intent(out), optional :: stat

subroutine add_array_to_array(array, ptr, stat)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • type (toml_array), intent(out), pointer :: ptr

  • integer, intent(out), optional :: stat

interface add_keyval#
subroutine add_keyval_to_table(table, key, ptr, stat)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • character (tfc), intent(in) :: key

  • type (toml_keyval), intent(out), pointer :: ptr

  • integer, intent(out), optional :: stat

subroutine add_keyval_to_table_key(table, key, ptr, stat)#

Arguments:

  • class (toml_table), intent(inout) :: table

  • type (toml_key), intent(in) :: key

  • type (toml_keyval), intent(out), pointer :: ptr

  • integer, intent(out), optional :: stat

subroutine add_keyval_to_array(array, ptr, stat)#

Arguments:

  • class (toml_array), intent(inout) :: array

  • type (toml_keyval), intent(out), pointer :: ptr

  • integer, intent(out), optional :: stat

function is_array_of_tables(array)#

Arguments:

Returns: logical

function cast_to_array(ptr)#

Arguments:

Returns: type (toml_array), pointer

function cast_to_table(ptr)#

Arguments:

Returns: type (toml_table), pointer

function cast_to_keyval(ptr)#

Arguments:

Returns: type (toml_keyval), pointer

subroutine new_table_(self)#

Arguments:

  • class (toml_value), intent(out), allocatable :: self

subroutine new_array_(self)#

Arguments:

  • class (toml_value), intent(out), allocatable :: self

subroutine new_keyval_(self)#

Arguments:

  • class (toml_value), intent(out), allocatable :: self

module tomlf_type_array#

Uses: tomlf_error, tomlf_type_value, tomlf_structure

type toml_array, extends(toml_value)#
member inline = .true.#

Type: logical

member list#

Type: class (toml_list_structure), allocatable

procedure get#

Binds to: get

procedure push_back#

Binds to: push_back

procedure shift#

Binds to: shift

procedure pop#

Binds to: pop

procedure destroy#

Binds to: destroy

Constructors:

function new_array_func()#

Returns: type (toml_array)

interface new#
subroutine new_array(self)#

Arguments:

interface len#
pure function get_len(self)#

Arguments:

Returns: integer

interface initialized#
pure function array_initialized(self)#

Arguments:

Returns: logical

subroutine get(self, idx, ptr)#

Arguments:

  • class (toml_array), intent(inout) :: self

  • integer, intent(in) :: idx

  • class (toml_value), intent(out), pointer :: ptr

subroutine push_back(self, val, stat)#

Arguments:

  • class (toml_array), intent(inout) :: self

  • class (toml_value), intent(inout), allocatable :: val

  • integer, intent(out) :: stat

subroutine shift(self, val)#

Arguments:

subroutine pop(self, val)#

Arguments:

subroutine destroy(self)#

Arguments:

module tomlf_type_keyval#

Uses: tomlf_constants, tomlf_datetime, tomlf_type_value

type generic_value#
type float_value, extends(generic_value)#
member raw#

Type: real (tfr)

type integer_value, extends(generic_value)#
member raw#

Type: integer (tfi)

type boolean_value, extends(generic_value)#
member raw#

Type: logical

type datetime_value, extends(generic_value)#
member raw#

Type: type (toml_datetime)

type string_value, extends(generic_value)#
member raw#

Type: character (tfc), allocatable

type toml_keyval, extends(toml_value)#
member val#

Type: class (generic_value), allocatable

member origin_value = 0#

Type: integer

procedure get#

Binds to: get_float, get_integer, get_boolean, get_datetime, get_string

procedure get_float#

Binds to: get_float

procedure get_integer#

Binds to: get_integer

procedure get_boolean#

Binds to: get_boolean

procedure get_datetime#

Binds to: get_datetime

procedure get_string#

Binds to: get_string

procedure set#

Binds to: set_float, set_integer, set_boolean, set_datetime, set_string

procedure set_float#

Binds to: set_float

procedure set_integer#

Binds to: set_integer

procedure set_boolean#

Binds to: set_boolean

procedure set_datetime#

Binds to: set_datetime

procedure set_string#

Binds to: set_string

procedure get_type#

Binds to: get_type

procedure destroy#

Binds to: destroy

interface new#
subroutine new_keyval(self)#

Arguments:

pure function get_type(self)#

Arguments:

Returns: integer

function cast_float(val)#

Arguments:

Returns: real (tfr), pointer

function cast_integer(val)#

Arguments:

Returns: integer (tfi), pointer

function cast_boolean(val)#

Arguments:

Returns: logical, pointer

function cast_datetime(val)#

Arguments:

Returns: type (toml_datetime), pointer

function cast_string(val)#

Arguments:

Returns: character (tfc), pointer

subroutine destroy(self)#

Arguments:

subroutine get_float(self, val)#

Arguments:

  • class (toml_keyval), intent(in) :: self

  • real (tfr), intent(out), pointer :: val

subroutine get_integer(self, val)#

Arguments:

  • class (toml_keyval), intent(in) :: self

  • integer (tfi), intent(out), pointer :: val

subroutine get_boolean(self, val)#

Arguments:

  • class (toml_keyval), intent(in) :: self

  • logical, intent(out), pointer :: val

subroutine get_datetime(self, val)#

Arguments:

subroutine get_string(self, val)#

Arguments:

  • class (toml_keyval), intent(in) :: self

  • character (tfc), intent(out), pointer :: val

subroutine set_float(self, val)#

Arguments:

  • class (toml_keyval), intent(inout) :: self

  • real (tfr), intent(in) :: val

subroutine set_integer(self, val)#

Arguments:

  • class (toml_keyval), intent(inout) :: self

  • integer (tfi), intent(in) :: val

subroutine set_boolean(self, val)#

Arguments:

  • class (toml_keyval), intent(inout) :: self

  • logical, intent(in) :: val

subroutine set_datetime(self, val)#

Arguments:

subroutine set_string(self, val)#

Arguments:

  • class (toml_keyval), intent(inout) :: self

  • character (tfc), intent(in) :: val

module tomlf_type_table#

Uses: tomlf_constants, tomlf_error, tomlf_type_value, tomlf_structure

type toml_table, extends(toml_value)#
member implicit = .false.#

Type: logical

member inline = .false.#

Type: logical

member map#

Type: class (toml_map_structure), allocatable

procedure get#

Binds to: get

procedure get_keys#

Binds to: get_keys

procedure has_key#

Binds to: has_key

procedure push_back#

Binds to: push_back

procedure pop#

Binds to: pop

procedure delete#

Binds to: delete

procedure destroy#

Binds to: destroy

Constructors:

function new_table_func()#

Returns: type (toml_table)

interface new#
subroutine new_table(self)#

Arguments:

interface initialized#
pure function table_initialized(self)#

Arguments:

Returns: logical

function has_key(self, key)#

Arguments:

  • class (toml_table), intent(inout) :: self

  • character (tfc), intent(in) :: key

Returns: logical

subroutine get(self, key, ptr)#

Arguments:

  • class (toml_table), intent(inout) :: self

  • character (tfc), intent(in) :: key

  • class (toml_value), intent(out), pointer :: ptr

subroutine get_keys(self, list)#

Arguments:

  • class (toml_table), intent(inout) :: self

  • type (toml_key), intent(out), allocatable :: list

subroutine push_back(self, val, stat)#

Arguments:

  • class (toml_table), intent(inout) :: self

  • class (toml_value), intent(inout), allocatable :: val

  • integer, intent(out) :: stat

subroutine pop(self, key, val)#

Arguments:

  • class (toml_table), intent(inout) :: self

  • character (tfc), intent(in) :: key

  • class (toml_value), intent(out), allocatable :: val

subroutine delete(self, key)#

Arguments:

  • class (toml_table), intent(inout) :: self

  • character (tfc), intent(in) :: key

subroutine destroy(self)#

Arguments:

module tomlf_type_value#

Uses: tomlf_constants, tomlf_utils

type toml_value#
member key#

Type: character (tfc), allocatable

member origin = 0#

Type: integer

procedure accept#

Binds to: accept

procedure get_key#

Binds to: get_key

procedure match_key#

Binds to: match_key

procedure destroy#
type toml_visitor#
procedure visit#
type toml_key#
member key#

Type: character (tfc), allocatable

member origin = 0#

Type: integer

pure function match_key(self, key)#

Arguments:

  • class (toml_value), intent(in) :: self

  • character (tfc), intent(in) :: key

Returns: logical

recursive subroutine accept(self, visitor)#

Arguments:

subroutine get_key(self, key)#

Arguments:

  • class (toml_value), intent(in) :: self

  • character (tfc), allocatable :: key

module tomlf_utils#

Uses: tomlf_constants, tomlf_datetime, tomlf_utils_io

interface to_string#
pure function to_string_i1(val)#

Arguments:

  • integer (ik), intent(in) :: val

Returns: character(len=:), allocatable

pure function to_string_i2(val)#

Arguments:

  • integer (ik), intent(in) :: val

Returns: character(len=:), allocatable

pure function to_string_i4(val)#

Arguments:

  • integer (ik), intent(in) :: val

Returns: character(len=:), allocatable

pure function to_string_i8(val)#

Arguments:

  • integer (ik), intent(in) :: val

Returns: character(len=:), allocatable

pure function to_string_r8(val)#

Arguments:

  • real (rk), intent(in) :: val

Returns: character(len=:), allocatable

subroutine toml_escape_string(raw, escaped, multiline)#

Arguments:

  • character (tfc), intent(in) :: raw

  • character (tfc), intent(out), allocatable :: escaped

  • logical, intent(in), optional :: multiline

module tomlf_utils_io#

Uses: tomlf_constants

subroutine read_whole_file(filename, string, stat)#

Arguments:

  • character (tfc), intent(in) :: filename

  • character (tfc), intent(out), allocatable :: string

  • integer, intent(out) :: stat

subroutine read_whole_line(io, string, stat)#

Arguments:

  • integer, intent(in) :: io

  • character (tfc), intent(out), allocatable :: string

  • integer, intent(out) :: stat

module tomlf_utils_sort#

Uses: tomlf_type_value

interface sort#
pure subroutine sort_keys(list, idx, compare)#

Arguments:

  • type (toml_key), intent(inout) :: list

  • integer, intent(out), optional :: idx

  • procedure(compare_less), optional :: compare

pure function compare_keys_less(lhs, rhs)#

Arguments:

Returns: logical

pure recursive subroutine quicksort(list, idx, low, high, less)#

Arguments:

  • type (toml_key), intent(inout) :: list

  • integer, intent(inout) :: idx

  • integer, intent(in) :: low

  • integer, intent(in) :: high

  • procedure(compare_less) :: less

pure subroutine swap(lhs, rhs)#

Arguments:

  • integer, intent(inout) :: lhs

  • integer, intent(inout) :: rhs

module tomlf_version#
parameter tomlf_version_string = "0.5.0"#

Type: character(len=*)

parameter tomlf_major = 0#

Type: integer

parameter tomlf_minor = 5#

Type: integer

parameter tomlf_patch = 0#

Type: integer

parameter tomlf_version_compact = tomlf_major*10000+tomlf_minor*100+tomlf_patch#

Type: integer

subroutine get_tomlf_version(major, minor, patch, string)#

Arguments:

  • integer, intent(out), optional :: major

  • integer, intent(out), optional :: minor

  • integer, intent(out), optional :: patch

  • character(len=:), intent(out), optional, allocatable :: string