Parser and evaluator for CIntSwissKnife. More...
#include <Int64MathParser.h>
Classes | |
| struct | Operation |
Public Member Functions | |
| CInt64MathParser (void) | |
| const char * | Eval (int64_t *result) |
| const char * | Parse (const char *Formula, bool ConvertUpperCase) |
| ~CInt64MathParser () | |
Public Attributes | |
| CStrMap * | ExtFunctions |
| PrmSrchFunc | MoreParams |
| CStrMap * | Parameters |
| void * | ParamFuncParam |
Private Types | |
| typedef char *(* | MultiArgFunc) (int paramcnt, int64_t *args, CStrMap *strparams, int64_t *result) |
| typedef int64_t(* | OneArgFunc) (int64_t arg) |
| typedef struct CInt64MathParser::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 } |
| typedef int(* | PrmSrchFunc) (const char *str, size_t len, int64_t *value, void *param) |
Private Member Functions | |
| const char * | Calc () |
| const char * | CalcToObr () |
| const char * | ParseFormula (bool ConvertUpperCase) |
| const char * | PrepareFormula () |
Private Attributes | |
| std::vector< char > | errbuf |
| CInt64Lexer | Lexer |
| int | ObrDist |
| std::vector< Operation > | OpStack |
| std::vector< Operation > | OpStackEval |
| int | OpTop |
| std::vector< int64_t > | ValStack |
| std::vector< int64_t > | ValStackEval |
| int | ValTop |
| CStrMap * | VarParams |
Static Private Attributes | |
| static const Operation | BrOp |
| static const Operation | CbrOp |
| static const Operation | CommaOp |
| static CStaticFuncMapInt64 | IntFunctions |
| static const Operation | ItvOp |
| static CSymTable | MathSymTable |
| static const Operation | NegOp |
| static const signed char | OpPriorities [OP_FUNC_MULTIARG+1] |
Parser and evaluator for CIntSwissKnife.
Definition at line 51 of file Int64MathParser.h.
|
private |
Definition at line 54 of file Int64MathParser.h.
Definition at line 53 of file Int64MathParser.h.
|
private |
|
private |
Definition at line 56 of file Int64MathParser.h.
|
private |
Definition at line 58 of file Int64MathParser.h.
| CInt64MathParser::CInt64MathParser | ( | void | ) |
| CInt64MathParser::~CInt64MathParser | ( | ) |
|
private |
|
private |
| const char* CInt64MathParser::Eval | ( | int64_t * | result | ) |
| const char* CInt64MathParser::Parse | ( | const char * | Formula, |
| bool | ConvertUpperCase | ||
| ) |
|
private |
|
private |
|
staticprivate |
Definition at line 84 of file Int64MathParser.h.
|
staticprivate |
Definition at line 85 of file Int64MathParser.h.
|
staticprivate |
Definition at line 88 of file Int64MathParser.h.
|
private |
Definition at line 99 of file Int64MathParser.h.
| CStrMap* CInt64MathParser::ExtFunctions |
Definition at line 106 of file Int64MathParser.h.
|
staticprivate |
Definition at line 97 of file Int64MathParser.h.
|
staticprivate |
Definition at line 87 of file Int64MathParser.h.
|
private |
Definition at line 95 of file Int64MathParser.h.
|
staticprivate |
Definition at line 98 of file Int64MathParser.h.
| PrmSrchFunc CInt64MathParser::MoreParams |
Definition at line 107 of file Int64MathParser.h.
|
staticprivate |
Definition at line 86 of file Int64MathParser.h.
|
private |
Definition at line 94 of file Int64MathParser.h.
|
staticprivate |
Definition at line 73 of file Int64MathParser.h.
|
private |
Definition at line 89 of file Int64MathParser.h.
|
private |
Definition at line 90 of file Int64MathParser.h.
|
private |
Definition at line 93 of file Int64MathParser.h.
| CStrMap* CInt64MathParser::Parameters |
Definition at line 105 of file Int64MathParser.h.
| void* CInt64MathParser::ParamFuncParam |
Definition at line 108 of file Int64MathParser.h.
|
private |
Definition at line 91 of file Int64MathParser.h.
|
private |
Definition at line 92 of file Int64MathParser.h.
|
private |
Definition at line 93 of file Int64MathParser.h.
|
private |
Definition at line 96 of file Int64MathParser.h.