表达式操作符
更多...
#include <eienexpr.hpp>
|
static bool | Possibility (winux::String const &str) |
| 判断是否有解析为操作符的可能性,仅是文本上的 更多...
|
|
static void | AddOpr (winux::String const &oprStr, bool isUnary, bool isRight, short level, OperatorFunction oprFn) |
| 动态添加一个操作符 更多...
|
|
static bool | DelOpr (winux::String const &oprStr, bool isUnary, bool isRight) |
| 动态移除一个操作符 更多...
|
|
static bool | ModifyOpr (int i, winux::String const &oprStr, bool isUnary, bool isRight, short level, OperatorFunction oprFn) |
| 动态修改一个操作符 更多...
|
|
static int | FindOpr (ExprOperator *opr, winux::String const &oprStr, bool isUnary=false, bool isRight=false) |
| 查找预定义的字符 更多...
|
|
static int | GetOpr (winux::String const &oprStr, ExprOperator *oprArr, int n) |
| 取得指定字符串的所有操作符,返回取得的个数,当n==0,则只返回个数 更多...
|
|
static int | GetAllOprs (ExprOperator *oprArr, int n) |
| 取得所有操作符,返回取得的个数,当n==0,则只返回个数 更多...
|
|
表达式操作符
在文件 eienexpr.hpp 第 82 行定义.
eienexpr::ExprOperator::ExprOperator |
( |
winux::String const & |
oprStr = "" , |
|
|
bool |
isUnary = false , |
|
|
bool |
isRight = false , |
|
|
short |
level = 0 , |
|
|
OperatorFunction |
oprFn = NULL |
|
) |
| |
virtual eienexpr::ExprOperator::~ExprOperator |
( |
| ) |
|
|
virtual |
virtual ExprAtom* eienexpr::ExprOperator::clone |
( |
| ) |
const |
|
virtual |
static bool eienexpr::ExprOperator::DelOpr |
( |
winux::String const & |
oprStr, |
|
|
bool |
isUnary, |
|
|
bool |
isRight |
|
) |
| |
|
static |
static int eienexpr::ExprOperator::FindOpr |
( |
ExprOperator * |
opr, |
|
|
winux::String const & |
oprStr, |
|
|
bool |
isUnary = false , |
|
|
bool |
isRight = false |
|
) |
| |
|
static |
static int eienexpr::ExprOperator::GetAllOprs |
( |
ExprOperator * |
oprArr, |
|
|
int |
n |
|
) |
| |
|
static |
取得所有操作符,返回取得的个数,当n==0,则只返回个数
取得指定字符串的所有操作符,返回取得的个数,当n==0,则只返回个数
bool eienexpr::ExprOperator::isRight |
( |
| ) |
const |
|
inline |
bool eienexpr::ExprOperator::isUnary |
( |
| ) |
const |
|
inline |
static bool eienexpr::ExprOperator::ModifyOpr |
( |
int |
i, |
|
|
winux::String const & |
oprStr, |
|
|
bool |
isUnary, |
|
|
bool |
isRight, |
|
|
short |
level, |
|
|
OperatorFunction |
oprFn |
|
) |
| |
|
static |
int eienexpr::ExprOperator::nexus |
( |
ExprOperator const & |
opr | ) |
const |
操作符优先关系(低于:-1, 高于:1, 错误:-2)
看优先级别,如果本算符级别大于opr算符级别,则返回1,小于则返回-1 (以opr算符在本算符左边为依据
)若相同,则看opr的结合性,左结合返回-1,右结合返回1
static bool eienexpr::ExprOperator::Possibility |
( |
winux::String const & |
str | ) |
|
|
static |
bool eienexpr::ExprOperator::_isRight |
|
protected |
bool eienexpr::ExprOperator::_isUnary |
|
protected |
short eienexpr::ExprOperator::_level |
|
protected |
std::vector<ExprOperator> eienexpr::ExprOperator::_Operators |
|
staticprotected |
该类的文档由以下文件生成: