Expression parser and evaluator of CSwissKnife. More...
#include <MathParser.h>
Classes | |
struct | Operation |
Public Member Functions | |
CMathParser (void) | |
const char * | Eval (double *result) |
const char * | Parse (const char *Formula, bool ConvertUpperCase) |
~CMathParser () | |
Public Attributes | |
CStrMap * | ExtFunctions |
PrmSrchFunc | MoreParams |
CStrMap * | Parameters |
void * | ParamFuncParam |
Private Types | |
typedef struct CMathParser::Operation | Operation |
enum | OperType_t { OP_SHL, OP_SHR, OP_POW, OP_LOGIC_NEQ, OP_LOGIC_GEQ, OP_LOGIC_LEQ, OP_LOGIC_AND, OP_LOGIC_OR, OP_COMSTART, OP_ASSIGN, OP_OBR, OP_ADD, OP_SUB, OP_MUL, OP_DIV, OP_MOD, OP_UNK, OP_XOR, OP_NOT, OP_AND, OP_OR, OP_EQU, OP_GREATER, OP_LESS, OP_LOGIC, OP_LOGIC_SEP, OP_CBR, OP_COMMA, OP_FORMULAEND, OP_INDEX_TO_VAR, OP_FUNC_ONEARG, OP_FUNC_MULTIARG } |
Private Member Functions | |
const char * | Calc () |
const char * | CalcToObr () |
const char * | ParseFormula (bool ConvertUpperCase) |
const char * | PrepareFormula () |
Private Attributes | |
std::vector< char > | errbuf |
CLexer | Lexer |
int | ObrDist |
std::vector< Operation > | OpStack |
std::vector< Operation > | OpStackEval |
int | OpTop |
std::vector< double > | ValStack |
std::vector< double > | ValStackEval |
int | ValTop |
CStrMap * | VarParams |
Static Private Attributes | |
static const Operation | BrOp |
static const Operation | CbrOp |
static const Operation | CommaOp |
static CStaticFuncMapDouble | DoubleFunctions |
static const Operation | ItvOp |
static CSymTable | MathSymTable |
static const Operation | NegOp |
static const signed char | OpPriorities [OP_FUNC_MULTIARG+1] |
Expression parser and evaluator of CSwissKnife.
Definition at line 51 of file MathParser.h.
|
private |
|
private |
Definition at line 53 of file MathParser.h.
CMathParser::CMathParser | ( | void | ) |
CMathParser::~CMathParser | ( | ) |
|
private |
|
private |
const char* CMathParser::Eval | ( | double * | result | ) |
const char* CMathParser::Parse | ( | const char * | Formula, |
bool | ConvertUpperCase | ||
) |
|
private |
|
private |
|
staticprivate |
Definition at line 79 of file MathParser.h.
|
staticprivate |
Definition at line 80 of file MathParser.h.
|
staticprivate |
Definition at line 83 of file MathParser.h.
|
staticprivate |
Definition at line 93 of file MathParser.h.
|
private |
Definition at line 92 of file MathParser.h.
CStrMap* CMathParser::ExtFunctions |
Definition at line 101 of file MathParser.h.
|
staticprivate |
Definition at line 82 of file MathParser.h.
|
private |
Definition at line 90 of file MathParser.h.
|
staticprivate |
Definition at line 94 of file MathParser.h.
PrmSrchFunc CMathParser::MoreParams |
Definition at line 102 of file MathParser.h.
|
staticprivate |
Definition at line 81 of file MathParser.h.
|
private |
Definition at line 89 of file MathParser.h.
|
staticprivate |
Definition at line 68 of file MathParser.h.
|
private |
Definition at line 84 of file MathParser.h.
|
private |
Definition at line 85 of file MathParser.h.
|
private |
Definition at line 88 of file MathParser.h.
CStrMap* CMathParser::Parameters |
Definition at line 100 of file MathParser.h.
void* CMathParser::ParamFuncParam |
Definition at line 103 of file MathParser.h.
|
private |
Definition at line 86 of file MathParser.h.
|
private |
Definition at line 87 of file MathParser.h.
|
private |
Definition at line 88 of file MathParser.h.
|
private |
Definition at line 91 of file MathParser.h.