tape_t Derived Type

type, public :: tape_t

This type holds the input pattern string and manages the index of the character it is currently focused.


Components

Type Visibility Attributes Name Initial
integer(kind=int32), public :: current_token
integer(kind=int32), public :: idx = 0
character(len=:), public, allocatable :: str
character(len=UTF8_CHAR_SIZE), public :: token_char = EMPTY

Type-Bound Procedures

procedure, public :: get_token

  • private pure subroutine get_token(self, class_flag)

    Get the currently focused character (1 to 4 bytes) from the entire string inside the type_t derived-type, and store the enumerator's numeric value in the current_token component. This is a type-bound procedure of tape_t.

    Arguments

    Type IntentOptional Attributes Name
    class(tape_t), intent(inout) :: self
    logical, intent(in), optional :: class_flag