node_mod Module

module~~node_mod~~UsesGraph module~node_mod node_mod module~kinds_mod kinds_mod module~kinds_mod->module~node_mod module~text_mod text_mod module~kinds_mod->module~text_mod module~time_mod time_mod module~kinds_mod->module~time_mod module~text_mod->module~node_mod module~time_mod->module~text_mod iso_fortran_env iso_fortran_env iso_fortran_env->module~text_mod iso_c_binding iso_c_binding iso_c_binding->module~time_mod
Help

Used By

module~~node_mod~~UsedByGraph module~node_mod node_mod module~treetrigonometric_mod treeTrigonometric_mod module~node_mod->module~treetrigonometric_mod module~treevalue_mod treeValue_mod module~node_mod->module~treevalue_mod module~treeoperator_mod treeOperator_mod module~node_mod->module~treeoperator_mod module~treeexponential_mod treeExponential_mod module~node_mod->module~treeexponential_mod module~expression_mod expression_mod module~node_mod->module~expression_mod module~treetrigonometric_mod->module~expression_mod module~treevalue_mod->module~expression_mod module~treeoperator_mod->module~expression_mod module~treeexponential_mod->module~expression_mod program~testeval_prg testEval_prg module~expression_mod->program~testeval_prg
Help


Variables

TypeVisibility AttributesNameInitial
character(len=8), public, parameter:: ops =',+-*/^()'
integer, public, parameter:: R_SPAN =99
integer, public, parameter:: T_NONE =-1
integer, public, parameter:: T_REAL =-2
integer, public, parameter:: T_IMAG =-3
integer, public, parameter:: T_VAR =-4
integer, public, parameter:: T_CMA =001
integer, public, parameter:: T_LPR =002
integer, public, parameter:: T_RPR =003
integer, public, parameter:: T_OPERATOR =200
integer, public, parameter:: T_ADD =201
integer, public, parameter:: T_SUB =202
integer, public, parameter:: T_MUL =203
integer, public, parameter:: T_DIV =204
integer, public, parameter:: T_POW =205
integer, public, parameter:: T_FUNCTION =100
integer, public, parameter:: T_NEG =101
integer, public, parameter:: T_SQRT =102
integer, public, parameter:: T_EXP =103
integer, public, parameter:: T_LOG =104
integer, public, parameter:: T_ABS =105
integer, public, parameter:: T_SIN =106
integer, public, parameter:: T_COS =107
integer, public, parameter:: T_TAN =108
integer, public, parameter:: T_ASIN =109
integer, public, parameter:: T_ACOS =110
integer, public, parameter:: T_ATAN =111
integer, public, parameter:: T_LOG10 =112

Interfaces

interface

  • public function evalR_p(self, args) result(o)

    Arguments

    Type IntentOptional AttributesName
    class(node_t), intent(in) :: self
    real(kind=wp), intent(in), dimension(:):: args

    Return Value real(kind=wp)

interface

  • public function evalZ_p(self, args) result(o)

    Arguments

    Type IntentOptional AttributesName
    class(node_t), intent(in) :: self
    complex(kind=wp), intent(in), dimension(:):: args

    Return Value complex(kind=wp)

public interface nodeStack_t

  • public function newNodeStack(N) result(self)

    Arguments

    Type IntentOptional AttributesName
    integer, intent(in) :: N

    Return Value type(nodeStack_t)

public interface token_t

Constructors for token_t

  • public function newToken(str) result(self)

    Constructor for token_t

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: str

    String to parse

    Return Value type(token_t)

    New token_t


Derived Types

type, public, abstract :: node_t

Type-Bound Procedures

generic, public :: eval => evalR, evalZ

type, public :: genericNode_t

Components

TypeVisibility AttributesNameInitial
class(node_t), public, allocatable:: node

type, public :: nodeStack_t

Components

TypeVisibility AttributesNameInitial
type(genericNode_t), public, dimension(:), allocatable:: levels

Constructor

public function newNodeStack(N)

Type-Bound Procedures

procedure, public :: pop
procedure, public :: push

type, public :: token_t

Type for a single mathematical token

Components

TypeVisibility AttributesNameInitial
integer, public :: t =T_NONE

Token type

real(kind=wp), public :: a =0.0_wp

Token real value (if any)

character(len=8), public :: s =''

Token label (if any)

Constructor

Constructors for token_t

public function newToken(str)

Constructor for token_t


Functions

public function newNodeStack(N) result(self)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: N

Return Value type(nodeStack_t)

public function pop(self) result(o)

Arguments

Type IntentOptional AttributesName
class(nodeStack_t), intent(inout) :: self

Return Value class(node_t), allocatable

public function newToken(str) result(self)

Constructor for token_t

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: str

String to parse

Return Value type(token_t)

New token_t

public function toRPN(tks) result(o)

Convert a list of tokens from read order into RPN

Arguments

Type IntentOptional AttributesName
type(token_t), intent(in), dimension(:):: tks

Input tokens in read order

Return Value type(token_t), dimension(:), allocatable

Output list in RPN

public function tokenize(str) result(o)

Split a character into tokens

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: str

Character to split

Return Value type(token_t), dimension(:), allocatable

Resulting list of tokens


Subroutines

public subroutine push(self, a)

Arguments

Type IntentOptional AttributesName
class(nodeStack_t), intent(inout) :: self
class(node_t), intent(in) :: a