Loading...
Searching...
No Matches
fpx_token Module Reference

Derived types and interfaces

interface  strtol
 Converts a string to integer. More...
 
type  token
 Represents a single token in a parsed expression. Holds the string value of the token and its classified type. More...
 

Enumerations

enum  {
  unknown = -1 , number = 0 , operator = 1 , identifier = 2 ,
  parenthesis = 3 , defined = 4
}
 

Functions/Subroutines

logical function, public evaluate_expression (expr, macros, val)
 
logical elemental function is_digit (ch)
 
logical function is_typeless (str, pos)
 
integer function strtol_default (str, success)
 
integer function strtol_with_base (str, base, success)
 
recursive integer function, public parse_expression (tokens, ntokens, pos, macros)
 
recursive integer function parse_or (tokens, ntokens, pos, macros)
 
recursive integer function parse_and (tokens, ntokens, pos, macros)
 
recursive integer function parse_bitwise_or (tokens, ntokens, pos, macros)
 
recursive integer function parse_bitwise_xor (tokens, ntokens, pos, macros)
 
recursive integer function parse_bitwise_and (tokens, ntokens, pos, macros)
 
recursive integer function parse_equality (tokens, ntokens, pos, macros)
 
recursive integer function parse_relational (tokens, ntokens, pos, macros)
 
recursive integer function parse_shifting (tokens, ntokens, pos, macros)
 
recursive integer function parse_additive (tokens, ntokens, pos, macros)
 
recursive integer function parse_multiplicative (tokens, ntokens, pos, macros)
 
recursive integer function parse_power (tokens, ntokens, pos, macros)
 
recursive integer function parse_unary (tokens, ntokens, pos, macros)
 
recursive integer function parse_atom (tokens, ntokens, pos, macros)
 
subroutine tokenize (expr, tokens, ntokens)
 

Variables

integer, parameter tokens_enum = kind(unknown)
 Kind parameter for token type enumeration.
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
unknown 
number 
operator 
identifier 
parenthesis 
defined 

Definition at line 76 of file token.f90.

Function/Subroutine Documentation

◆ evaluate_expression()

logical function, public evaluate_expression ( character(*), intent(in) expr,
type(macro), dimension(:), intent(in) macros,
integer, intent(out), optional val )

Definition at line 170 of file token.f90.

◆ is_digit()

logical elemental function is_digit ( character(*), intent(in) ch)
private

Definition at line 204 of file token.f90.

◆ is_typeless()

logical function is_typeless ( character(*), intent(in) str,
integer, intent(out) pos )
private

Definition at line 219 of file token.f90.

◆ parse_additive()

recursive integer function parse_additive ( type(token), dimension(:), intent(in) tokens,
integer, intent(in) ntokens,
integer, intent(inout) pos,
type(macro), dimension(:), intent(in) macros )
private

Definition at line 616 of file token.f90.

◆ parse_and()

recursive integer function parse_and ( type(token), dimension(:), intent(in) tokens,
integer, intent(in) ntokens,
integer, intent(inout) pos,
type(macro), dimension(:), intent(in) macros )
private

Definition at line 390 of file token.f90.

◆ parse_atom()

recursive integer function parse_atom ( type(token), dimension(:), intent(in) tokens,
integer, intent(in) ntokens,
integer, intent(inout) pos,
type(macro), dimension(:), intent(in) macros )
private

Definition at line 756 of file token.f90.

◆ parse_bitwise_and()

recursive integer function parse_bitwise_and ( type(token), dimension(:), intent(in) tokens,
integer, intent(in) ntokens,
integer, intent(inout) pos,
type(macro), dimension(:), intent(in) macros )
private

Definition at line 474 of file token.f90.

◆ parse_bitwise_or()

recursive integer function parse_bitwise_or ( type(token), dimension(:), intent(in) tokens,
integer, intent(in) ntokens,
integer, intent(inout) pos,
type(macro), dimension(:), intent(in) macros )
private

Definition at line 418 of file token.f90.

◆ parse_bitwise_xor()

recursive integer function parse_bitwise_xor ( type(token), dimension(:), intent(in) tokens,
integer, intent(in) ntokens,
integer, intent(inout) pos,
type(macro), dimension(:), intent(in) macros )
private

Definition at line 446 of file token.f90.

◆ parse_equality()

recursive integer function parse_equality ( type(token), dimension(:), intent(in) tokens,
integer, intent(in) ntokens,
integer, intent(inout) pos,
type(macro), dimension(:), intent(in) macros )
private

Definition at line 502 of file token.f90.

◆ parse_expression()

recursive integer function, public parse_expression ( type(token), dimension(:), intent(in) tokens,
integer, intent(in) ntokens,
integer, intent(inout) pos,
type(macro), dimension(:), intent(in) macros )

Definition at line 344 of file token.f90.

◆ parse_multiplicative()

recursive integer function parse_multiplicative ( type(token), dimension(:), intent(in) tokens,
integer, intent(in) ntokens,
integer, intent(inout) pos,
type(macro), dimension(:), intent(in) macros )
private

Definition at line 651 of file token.f90.

◆ parse_or()

recursive integer function parse_or ( type(token), dimension(:), intent(in) tokens,
integer, intent(in) ntokens,
integer, intent(inout) pos,
type(macro), dimension(:), intent(in) macros )
private

Definition at line 363 of file token.f90.

◆ parse_power()

recursive integer function parse_power ( type(token), dimension(:), intent(in) tokens,
integer, intent(in) ntokens,
integer, intent(inout) pos,
type(macro), dimension(:), intent(in) macros )
private

Definition at line 690 of file token.f90.

◆ parse_relational()

recursive integer function parse_relational ( type(token), dimension(:), intent(in) tokens,
integer, intent(in) ntokens,
integer, intent(inout) pos,
type(macro), dimension(:), intent(in) macros )
private

Definition at line 537 of file token.f90.

◆ parse_shifting()

recursive integer function parse_shifting ( type(token), dimension(:), intent(in) tokens,
integer, intent(in) ntokens,
integer, intent(inout) pos,
type(macro), dimension(:), intent(in) macros )
private

Definition at line 581 of file token.f90.

◆ parse_unary()

recursive integer function parse_unary ( type(token), dimension(:), intent(in) tokens,
integer, intent(in) ntokens,
integer, intent(inout) pos,
type(macro), dimension(:), intent(in) macros )
private

Definition at line 719 of file token.f90.

◆ strtol_default()

integer function strtol_default ( character(*), intent(in) str,
logical, intent(out), optional success )
private

Definition at line 236 of file token.f90.

◆ strtol_with_base()

integer function strtol_with_base ( character(*), intent(in) str,
integer, intent(inout) base,
logical, intent(out), optional success )
private

Definition at line 246 of file token.f90.

◆ tokenize()

subroutine tokenize ( character(*), intent(in) expr,
type(token), dimension(:), intent(out), allocatable tokens,
integer, intent(out) ntokens )
private

Definition at line 818 of file token.f90.