This class provides the main interface for parsing expressions. More...
#include <Parser.h>
Static Public Member Functions | |
static ParsedExpression | parse (const std::string &expression) |
Parse a mathematical expression and return a representation of it as an abstract syntax tree. More... | |
static ParsedExpression | parse (const std::string &expression, const std::map< std::string, CustomFunction *> &customFunctions) |
Parse a mathematical expression and return a representation of it as an abstract syntax tree. More... | |
Static Private Member Functions | |
static Operation * | getFunctionOperation (const std::string &name, const std::map< std::string, CustomFunction *> &customFunctions) |
static ParseToken | getNextToken (const std::string &expression, int start) |
static Operation * | getOperatorOperation (const std::string &name) |
static ExpressionTreeNode | parsePrecedence (const std::vector< ParseToken > &tokens, int &pos, const std::map< std::string, CustomFunction *> &customFunctions, const std::map< std::string, ExpressionTreeNode > &subexpressionDefs, int precedence) |
static std::vector< ParseToken > | tokenize (const std::string &expression) |
static std::string | trim (const std::string &expression) |
This class provides the main interface for parsing expressions.
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
static |
Parse a mathematical expression and return a representation of it as an abstract syntax tree.
|
static |
Parse a mathematical expression and return a representation of it as an abstract syntax tree.
customFunctions | a map specifying user defined functions that may appear in the expression. The key are function names, and the values are corresponding CustomFunction objects. |
|
staticprivate |
|
staticprivate |
|
staticprivate |
Hosted by GitHub | 1.8.14 |