diff --git a/lib/config/aexpression.cpp b/lib/config/aexpression.cpp index 3933efd92..c1f1b3a66 100644 --- a/lib/config/aexpression.cpp +++ b/lib/config/aexpression.cpp @@ -145,11 +145,6 @@ void AExpression::Dump(std::ostream& stream, int indent) const DumpOperand(stream, m_Operand2, indent + 1); } -void AExpression::Dump(void) const -{ - Dump(std::cerr); -} - Value AExpression::EvaluateOperand1(const Dictionary::Ptr& locals) const { return static_cast(m_Operand1)->Evaluate(locals); diff --git a/lib/config/aexpression.h b/lib/config/aexpression.h index 181ba5740..6a0236205 100644 --- a/lib/config/aexpression.h +++ b/lib/config/aexpression.h @@ -48,8 +48,7 @@ public: void MakeInline(void); void Dump(std::ostream& stream, int indent = 0) const; - void Dump(void) const; - + static Value OpLiteral(const AExpression *expr, const Dictionary::Ptr& locals); static Value OpVariable(const AExpression *expr, const Dictionary::Ptr& locals); static Value OpNegate(const AExpression *expr, const Dictionary::Ptr& locals); diff --git a/lib/config/config_lexer.ll b/lib/config/config_lexer.ll index d6e9331ea..06e116113 100644 --- a/lib/config/config_lexer.ll +++ b/lib/config/config_lexer.ll @@ -250,7 +250,7 @@ in { yylval->op = &AExpression::OpIn; return T_IN; } \+ { yylval->op = &AExpression::OpAdd; return T_PLUS; } \- { yylval->op = &AExpression::OpSubtract; return T_MINUS; } \* { yylval->op = &AExpression::OpMultiply; return T_MULTIPLY; } -\/ { yylval->op = &AExpression::OpMultiply; return T_DIVIDE; } +\/ { yylval->op = &AExpression::OpMultiply; return T_DIVIDE_OP; } \& { yylval->op = &AExpression::OpBinaryAnd; return T_BINARY_AND; } \| { yylval->op = &AExpression::OpBinaryOr; return T_BINARY_OR; } \< { yylval->op = &AExpression::OpLessThan; return T_LESS_THAN; } diff --git a/lib/config/config_parser.yy b/lib/config/config_parser.yy index 8be7318b5..95cea330a 100644 --- a/lib/config/config_parser.yy +++ b/lib/config/config_parser.yy @@ -115,7 +115,7 @@ using namespace icinga; %token T_PLUS "+ (T_PLUS)" %token T_MINUS "- (T_MINUS)" %token T_MULTIPLY "* (T_MULTIPLY)" -%token T_DIVIDE "/ (T_DIVIDE)" +%token T_DIVIDE_OP "/ (T_DIVIDE_OP)" %token T_BINARY_AND "& (T_BINARY_AND)" %token T_BINARY_OR "| (T_BINARY_OR)" %token T_LESS_THAN "< (T_LESS_THAN)" @@ -578,7 +578,7 @@ lterm: identifier lbinary_op rterm rbinary_op: T_PLUS | T_MINUS | T_MULTIPLY - | T_DIVIDE + | T_DIVIDE_OP | T_BINARY_AND | T_BINARY_OR | T_LESS_THAN