19 #ifndef _MATHPARSER_H_
20 #define _MATHPARSER_H_
30 #ifdef _MSC_VER // *JS*
31 # pragma warning(push)
32 # pragma warning(disable: 4251) // class 'xxx' needs to have dll-interface to be used by clients of class 'yyy'
35 #define ORIGINAL_STACK_SIZE 64
40 extern const double DblNiN;
44 typedef char* ( *MultiArgFunc ) (
int paramcnt,
double* args,
45 CStrMap* strparams,
double* result );
46 typedef int ( *
PrmSrchFunc ) (
const char* str,
size_t len,
double* value,
63 OP_ADD, OP_SUB, OP_MUL, OP_DIV, OP_MOD,
OP_UNK,
70 static const signed char OpPriorities[OP_FUNC_MULTIARG + 1];
77 explicit Operation() : Func( 0 ), PrevValTop( 0 ), StrParams( 0 ) {}
79 explicit Operation(
OperType_t op,
const void* p,
signed char a,
CStrMap* pM ) : OperType( op ), Func( p ), PrevValTop( a ), StrParams( pM ) {}
97 const char* ParseFormula(
bool ConvertUpperCase );
98 const char* PrepareFormula();
100 const char* CalcToObr();
107 const char* Parse(
const char* Formula,
bool ConvertUpperCase );
108 const char* Eval(
double* result );
114 #ifdef _MSC_VER // *JS*
115 # pragma warning(pop)
118 #endif //_MATHPARSER_H_