Loading...
Searching...
No Matches
evaluate_stacks

Definition

Stacks module It contains the valstack and opstack stacks to store the operand values and the operator values, respectively.

Data Types

module  item
 Provides a simple class for describing operation items. More...
 

Variables

complex(c8), dimension(numtok), public valstack
 Represent a fixed length last-in-first-out (LIFO) collection of complex (c8) values. It contains all the the values used for the estimation of the expression. Its capacity is set equal to the preprocessor macro EVALUTE_STACKSIZE. The default value is 100.
 
type(item), dimension(numtok), public opstack
 Represent a fixed length last-in-first-out (LIFO) collection of item class. It contains all the the operations encountered during the parsing of the expression and used for the estimation of the expression. Its capacity is set equal to the preprocessor macro EVALUTE_STACKSIZE. The default value is 100.
 

Methods

◆ popop()

subroutine, public popop ( type(item), intent(inout) op)

Takes top operator of operator stack and assigns it to op.

Parameters
[in]opfirst operator from the opstack

Remarks

Definition at line 109 of file Stacks.f90.

◆ popval()

subroutine, public popval ( complex(c8) val)

Takes top value off value stack and assigns it to val.

Parameters
[in]valfirst value from the valstack

Remarks

Definition at line 138 of file Stacks.f90.

◆ pushop()

subroutine, public pushop ( type(item), intent(in) op)

Push the operator to the stack.

Parameters
[in]opoperator to be added to the opstack

Remarks

Definition at line 92 of file Stacks.f90.

◆ pushval()

subroutine, public pushval ( complex(c8) val)

Puts value on value stack.

Parameters
[in]valvalue to be added to the valstack

Remarks

Definition at line 121 of file Stacks.f90.