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