22 #ifndef _INT64MATHPARSER_H_ 23 #define _INT64MATHPARSER_H_ 34 #ifdef _MSC_VER // *JS* 35 # pragma warning(push) 36 # pragma warning(disable: 4251) // class 'xxx' needs to have dll-interface to be used by clients of class 'yyy' 39 #define ORIGINAL_STACK_SIZE 64 44 extern const double DblErR;
57 typedef char* ( *MultiArgFunc ) (
int paramcnt,
int64_t* args,
69 OP_ADD, OP_SUB, OP_MUL, OP_DIV, OP_MOD,
OP_UNK,
76 static const signed char OpPriorities[OP_FUNC_MULTIARG + 1];
83 explicit Operation() : Func( 0 ), PrevValTop( 0 ), StrParams( 0 ) {}
84 explicit Operation( OperType_t op ) : OperType( op ), Func( 0 ), PrevValTop( 0 ), StrParams( 0 ) {}
85 explicit Operation( OperType_t op,
const void* p,
signed char a,
CStrMap* pM ) : OperType( op ), Func( p ), PrevValTop( a ), StrParams( pM ) {}
103 const char* ParseFormula(
bool ConvertUpperCase );
104 const char* PrepareFormula();
106 const char* CalcToObr();
114 const char* Parse(
const char* Formula,
bool ConvertUpperCase );
115 const char* Eval(
int64_t* result );
120 #ifdef _MSC_VER // *JS* 121 # pragma warning(pop) 124 #endif // _INT64MATHPARSER_H_
Common types used in the public GenApi interface.
Parser and evaluator for CIntSwissKnife.
std::vector< Operation > OpStackEval
#define MATHPARSERDLL_API
std::vector< Operation > OpStack
static CSymTable MathSymTable
int(* PrmSrchFunc)(const char *str, size_t len, double *value, void *param)
std::vector< int64_t > ValStackEval
Operation(OperType_t op, const void *p, signed char a, CStrMap *pM)
static const Operation ItvOp
static const Operation BrOp
double(* OneArgFunc)(double arg)
std::vector< int64_t > ValStack
static const Operation NegOp
static CStaticFuncMapInt64 IntFunctions
declspec's to be used for GenApi Windows dll
static const Operation CbrOp
std::vector< char > errbuf
Lexical analyzer for CIntSwissKnife.
Definition of CInt64Lexer.
static const Operation CommaOp