1 #ifndef L1TGlobal_GlobalLogicParser_h
2 #define L1TGlobal_GlobalLogicParser_h
RpnVector m_rpnVector
RPN vector - equivalent to the logical expression.
virtual const bool expressionResult() const
const OperationRule * getRuleFromType(OperationType t)
get the rule entry to an operation type
std::vector< OperandToken > m_operandTokenVector
vector of operand tokens
RpnVector rpnVector() const
return the RPN vector
void buildOperandTokenVectorNumExp()
std::string logicalExpression() const
return the logical expression
virtual const bool expressionResultNumExp() const
bool setLogicalExpression(const std::string &)
set the logical expression - check for correctness the input string
std::string m_numericalExpression
std::vector< GlobalLogicParser::OperandToken > expressionSeedsOperandList()
void clearRpnVector()
clear possible old rpn vector
int forbiddenLastOperation
bool buildRpnVector(const std::string &)
build the rpn vector
std::string m_logicalExpression
logical expression to be parsed
int operandIndex(const std::string &operandNameVal) const
return the position index of the operand in the logical expression
void convertIntToNameLogicalExpression(const std::map< int, std::string > &intToNameMap)
std::vector< OperandToken > & operandTokenVector()
return the vector of operand tokens
void addBracketSpaces(const std::string &, std::string &)
add spaces before and after parantheses
const std::vector< OperandToken > & operandTokenVector() const
std::vector< TokenRPN > RpnVector
static struct OperationRule m_operationRules[]
bool checkLogicalExpression(std::string &)
check a logical expression for correctness - add/remove spaces if needed
void convertNameToIntLogicalExpression(const std::map< std::string, int > &nameToIntMap)
bool operandResultNumExp(const std::string &operandNameVal) const
bool operandResult(const std::string &operandNameVal) const
GlobalLogicParser()
constructor(s)
virtual ~GlobalLogicParser()
destructor
void buildOperandTokenVector()
std::string operandName(const int iOperand) const
return the name of the (iOperand)th operand in the logical expression
virtual OperationType getOperation(const std::string &tokenString, OperationType lastOperation, TokenRPN &rpnToken) const
std::string numericalExpression() const
return the numerical expression
bool setNumericalExpression(const std::string &)