parseAction = function (action, identifiers, defined, scope) {
    var declares = [];
    forEach(identifiers, function (i) {
        if (action.indexOf(i) !== -1) {
            declares.push("var " + i + "= facts." + i + ";");
        }
    });
    extd(defined).keys().forEach(function (i) {
        if (action.indexOf(i) !== -1) {
            declares.push("var " + i + "= defined." + i + ";");
        }
    });

    extd(scope).keys().forEach(function (i) {
        if (action.indexOf(i) !== -1) {
            declares.push("var " + i + "= scope." + i + ";");
        }
    });
    extd(modifiers).forEach(function (i) {
        if (action.indexOf(i) !== -1) {
            declares.push("if(!" + i + "){ var " + i + "= flow." + i + ";}");
        }
    });
    var params = ["facts", 'flow'];
    if (/next\(.*\)/.test(action)) {
        params.push("next");
    }
    action = declares.join("") + action;
    try {
        return new Function("defined, scope", "return " + new Function(params.join(","), action).toString())(defined, scope);
    } catch (e) {
        throw new Error("Invalid action : " + action + "\n" + e.message);
    }
}
@private
Parses an action from a rule definition
@param {String} action the body of the action to execute
@param {Array} identifiers array of identifiers collected
@param {Object} defined an object of defined
@param scope
@return {Object}