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 41 extern const double DblErR;
54 typedef char* ( *MultiArgFunc ) (
int paramcnt,
int64_t* args,
66 OP_ADD, OP_SUB, OP_MUL, OP_DIV, OP_MOD,
OP_UNK,
73 static const signed char OpPriorities[OP_FUNC_MULTIARG + 1];
80 explicit Operation() : Func( 0 ), PrevValTop( 0 ), StrParams( 0 ) {}
81 explicit Operation( OperType_t op ) : OperType( op ), Func( 0 ), PrevValTop( 0 ), StrParams( 0 ) {}
82 explicit Operation( OperType_t op,
const void* p,
signed char a,
CStrMap* pM ) : OperType( op ), Func( p ), PrevValTop( a ), StrParams( pM ) {}
100 const char* ParseFormula(
bool ConvertUpperCase );
101 const char* PrepareFormula();
103 const char* CalcToObr();
111 const char* Parse(
const char* Formula,
bool ConvertUpperCase );
112 const char* Eval(
int64_t* result );
115 #ifdef _MSC_VER // *JS* 116 # pragma warning(pop) 119 #endif // _INT64MATHPARSER_H_ Map for variables in swissknife expression.
Parser and evaluator for CIntSwissKnife.
std::vector< int64_t > ValStack
Common types used in the public GenApi interface.
Operation(OperType_t op, const void *p, signed char a, CStrMap *pM)
static const Operation CbrOp
#define MATHPARSERDLL_API
static const Operation CommaOp
std::vector< char > errbuf
std::vector< Operation > OpStack
static CStaticFuncMapInt64 IntFunctions
std::vector< int64_t > ValStackEval
int(* PrmSrchFunc)(const char *str, size_t len, double *value, void *param)
static const Operation NegOp
Lexical analyzer for CIntSwissKnife.
static const Operation ItvOp
static const Operation BrOp
static CSymTable MathSymTable
std::vector< Operation > OpStackEval
declspec's to be used for GenApi Windows dll
double(* OneArgFunc)(double arg)
Definition of CInt64Lexer.