diff --git a/src/FEQParse.F90 b/src/FEQParse.F90 index ddf998f..a905654 100644 --- a/src/FEQParse.F90 +++ b/src/FEQParse.F90 @@ -81,7 +81,7 @@ module FEQParse procedure :: Print_InFixTokens procedure :: Print_PostFixTokens - procedure,private :: Priority + procedure,nopass,private :: Priority endtype EquationParser @@ -1664,23 +1664,7 @@ logical function IsFunction(varlen,eqChar,idx) enddo endfunction - function ToLowerCase(str) result(res) - character(*),intent(in) :: str - character(len(str)),allocatable :: res - integer :: i - - do i = 1,len(str) - select case(str(i:i)) - case('A':'Z') - res(i:i) = achar(iachar(str(i:i))+32) - case default - res(i:i) = str(i:i) - endselect - enddo - endfunction ToLowerCase - - integer function Priority(parser,toke) - class(EquationParser) :: parser + integer function Priority(toke) type(Token) :: toke if(toke%tokenType == Function_Token) then diff --git a/src/FEQParse_Functions.F90 b/src/FEQParse_Functions.F90 index 868ddd4..84321f9 100644 --- a/src/FEQParse_Functions.F90 +++ b/src/FEQParse_Functions.F90 @@ -76,7 +76,6 @@ pure real(real64) function f64(x) contains procedure,private,pass(lhs) :: character_array_assign_function procedure,private,pass(lhs) :: character_assign_function - procedure,private,pass(rhs) :: function_assign_character generic :: assignment(=) => character_assign_function,character_array_assign_function procedure,private,pass(lhs) :: function_eq_character procedure,private,pass(rhs) :: character_eq_function @@ -107,7 +106,6 @@ pure real(real64) function randomize_r64() interface AddFunction module procedure :: AddFunction32 module procedure :: AddFunction64 - module procedure :: AddFunction32And64 endinterface interface Tuple @@ -158,12 +156,6 @@ subroutine character_assign_function(lhs,rhs) maxFunctionLength = max(maxFunctionLength,lhs%len) endsubroutine - pure subroutine function_assign_character(lhs,rhs) - character(len=*),allocatable,intent(inout) :: lhs - class(FEQParse_Function),intent(in) :: rhs - lhs = rhs%str - endsubroutine - elemental function function_eq_character(lhs,rhs) result(ok) class(FEQParse_Function),intent(in) :: lhs !! Left hand side. character(len=*),intent(in) :: rhs !! Right hand side. @@ -306,25 +298,6 @@ subroutine AddFunction64(name,f_64) endif endsubroutine - subroutine AddFunction32And64(name,f_32,f_64) - character(*),intent(in) :: name - procedure(f32) :: f_32 - procedure(f64) :: f_64 - !private - type(FEQParse_Function) :: func - - call InitializeFunctions() - func = name - func%ptr32 => f_32 - func%ptr64 => f_64 - if(nFunctions < maxFunctions) then - Functions(nFunctions+1) = func - nFunctions = nFunctions+1 - else - stop 'Argument out of range' - endif - endsubroutine - elemental real(real32) function invoke32(this,x) result(fx) class(FEQParse_Function),intent(in) :: this real(real32),intent(in) :: x @@ -508,7 +481,7 @@ pure real(real64) function rand64(x) result(fx) pure function ToUpperCase(str) result(res) character(*),intent(in) :: str character(len(str)) :: res - integer :: i,j + integer :: i do i = 1,len(str) select case(str(i:i)) @@ -520,21 +493,6 @@ pure function ToUpperCase(str) result(res) enddo endfunction ToUpperCase - pure function ToLowerCase(str) result(res) - character(*),intent(in) :: str - character(len(str)),allocatable :: res - integer :: i - - do i = 1,len(str) - select case(str(i:i)) - case('A':'Z') - res(i:i) = achar(iachar(str(i:i))+32) - case default - res(i:i) = str(i:i) - endselect - enddo - endfunction ToLowerCase - endmodule FEQParse_Functions real(real32) function randomize_r32()