Adds method init to Operator class

This commit is contained in:
Felipe Zimmerle
2015-07-27 22:43:45 -03:00
parent 7b4554216e
commit c2d33823f5
3 changed files with 11 additions and 2 deletions

View File

@@ -261,8 +261,14 @@ expression:
audit_log
| DIRECTIVE SPACE variables SPACE OPERATOR SPACE QUOTATION_MARK actions QUOTATION_MARK
{
Operator *op = Operator::instantiate($5);
const char *error = NULL;
if (op->init(&error) == false) {
driver.parserError << error;
YYERROR;
}
Rule *rule = new Rule(
/* op */ Operator::instantiate($5),
/* op */ op,
/* variables */ $3,
/* actions */ $8
);