Code::Blocks
SVN r11506
|
#include <expression.h>
Public Member Functions | |
Expression () | |
void | AddToInfixExpression (wxString token) |
void | ConvertInfixToPostfix () |
bool | CalcPostfix () |
long | GetResult () const |
bool | GetStatus () const |
void | Clear () |
Private Types | |
typedef std::vector< ExpressionNode > | PostfixVector |
typedef std::vector< wxString > | InfixVector |
Private Member Functions | |
long | Calculate (ExpressionNode::ExpressionNodeType type, long first, long second) |
long | CalculateUnary (ExpressionNode::ExpressionNodeType type, long value) |
Private Attributes | |
PostfixVector | m_PostfixExpression |
InfixVector | m_InfixExpression |
bool | m_Status |
long | m_Result |
Definition at line 74 of file expression.h.
|
private |
Definition at line 97 of file expression.h.
|
private |
Definition at line 96 of file expression.h.
|
inline |
Definition at line 78 of file expression.h.
void Expression::AddToInfixExpression | ( | wxString | token | ) |
Definition at line 232 of file expression.cpp.
References ExpressionNode::IsBinaryOperator(), and wxString::IsEmpty().
Referenced by Tokenizer::CalcConditionExpression(), and ParserThread::CalcEnumExpression().
bool Expression::CalcPostfix | ( | ) |
Definition at line 359 of file expression.cpp.
References _T, ExpressionNode::GetTokenValue(), ExpressionNode::GetType(), ExpressionNode::IsUnaryOperator(), ExpressionNode::Numeric, and TRACE.
Referenced by Tokenizer::CalcConditionExpression(), and ParserThread::CalcEnumExpression().
|
private |
Definition at line 431 of file expression.cpp.
References ExpressionNode::And, ExpressionNode::BitwiseAnd, ExpressionNode::BitwiseOr, ExpressionNode::Divide, ExpressionNode::Equal, ExpressionNode::GT, ExpressionNode::GTOrEqual, ExpressionNode::LParenthesis, ExpressionNode::LShift, ExpressionNode::LT, ExpressionNode::LTOrEqual, ExpressionNode::Mod, ExpressionNode::Multiply, ExpressionNode::Not, ExpressionNode::Numeric, ExpressionNode::Or, ExpressionNode::Plus, ExpressionNode::Power, ExpressionNode::RParenthesis, ExpressionNode::RShift, ExpressionNode::Subtract, ExpressionNode::Unequal, and ExpressionNode::Unknown.
|
private |
Definition at line 482 of file expression.cpp.
References ExpressionNode::And, ExpressionNode::BitwiseAnd, ExpressionNode::BitwiseOr, ExpressionNode::Divide, ExpressionNode::Equal, ExpressionNode::GT, ExpressionNode::GTOrEqual, ExpressionNode::LParenthesis, ExpressionNode::LShift, ExpressionNode::LT, ExpressionNode::LTOrEqual, ExpressionNode::Mod, ExpressionNode::Multiply, ExpressionNode::Not, ExpressionNode::Numeric, ExpressionNode::Or, ExpressionNode::Plus, ExpressionNode::Power, ExpressionNode::RParenthesis, ExpressionNode::RShift, ExpressionNode::Subtract, ExpressionNode::Unequal, and ExpressionNode::Unknown.
void Expression::Clear | ( | ) |
Definition at line 226 of file expression.cpp.
Referenced by ParserThread::CalcEnumExpression().
void Expression::ConvertInfixToPostfix | ( | ) |
Definition at line 250 of file expression.cpp.
References _T, ExpressionNode::GetPriority(), ExpressionNode::GetType(), ExpressionNode::Initialize(), ExpressionNode::IsUnaryNode(), ExpressionNode::LParenthesis, ExpressionNode::Numeric, ExpressionNode::RParenthesis, ExpressionNode::SetUnaryOperator(), TRACE, ExpressionNode::Unknown, and wxString::wx_str().
Referenced by Tokenizer::CalcConditionExpression(), and ParserThread::CalcEnumExpression().
|
inline |
Definition at line 87 of file expression.h.
Referenced by Tokenizer::CalcConditionExpression(), and ParserThread::CalcEnumExpression().
|
inline |
Definition at line 88 of file expression.h.
Referenced by Tokenizer::CalcConditionExpression(), and ParserThread::CalcEnumExpression().
|
private |
Definition at line 100 of file expression.h.
|
private |
Definition at line 99 of file expression.h.
|
private |
Definition at line 102 of file expression.h.
|
private |
Definition at line 101 of file expression.h.