public static string IdentifyRegex = @"^(children|descendants)(\[(selected|deselected|unselected)\])?$", SplitRegex = null; //example : "descendants"

                    public override IEvalResult[] Eval(IEvalResult[] parameters)
                    {
                        // Setup parameters and variables
                        List<BLL.BusinessObjects.Feature> featureReferences = new List<BusinessObjects.Feature>();
                        foreach (IEvalResult parameter in parameters)
                        {
                            try
                            {
                                ObjectReference objRef = (ObjectReference)parameter;
                                featureReferences.Add((BusinessObjects.Feature)objRef.GetReference());
                            }
                            catch (Exception ex)
                            {
                                throw new SyntaxIncorrectException();
                            }
                        }
                        List<BLL.BusinessObjects.Feature> selectedFeatures = new List<BusinessObjects.Feature>();

                        // Select all the features
                        if (_syntaxString.Contains("children"))
                        {
                            //Children selector
                            foreach (BLL.BusinessObjects.Feature featureRef in featureReferences)
                            {
                                selectedFeatures.AddRange(_configSession.Model.GetChildFeatures(featureRef));
                            }
                        }
                        else if (_syntaxString.Contains("descendants"))
                        {
                            //Descendants selector
                            foreach (BLL.BusinessObjects.Feature featureRef in featureReferences)
                            {
                                selectedFeatures.AddRange(_configSession.Model.GetDescendantFeatures(featureRef));
                            }
                        }

                        // null if takes all the features
                        BusinessObjects.FeatureSelectionStates? featureSelectionState = null;

                        // find the feture state and save it to featureSelectionState, featureSelectionState remains null if could not find
                        foreach (var featureState in Enum.GetValues(typeof(BusinessObjects.FeatureSelectionStates)))
                        {
                            // get the state name
                            string enumSelector = string.Format(@"[{0}]", featureState.ToString().ToLower());

                            if (_syntaxString.Contains(enumSelector))
                            {
                                featureSelectionState = (BusinessObjects.FeatureSelectionStates)featureState;
                                break;
                            }
                        }

                        // Return a list of references pointing the selected features
                        List<IEvalResult> returnRef = new List<IEvalResult>();
                        foreach (BLL.BusinessObjects.Feature childFeature in selectedFeatures)
                        {
                            // Only childFeatures which are selected in the configuration
                            BLL.BusinessObjects.FeatureSelection featureSelection = _configSession.Configuration.GetFeatureSelectionByFeatureID(childFeature.ID);

                            // get all if there was no selector, else get only those which are of the given state
                            if (featureSelectionState == null || featureSelection.SelectionState == featureSelectionState)
                            {
                                object target = (object)childFeature;
                                ObjectReference objRef = new ObjectReference(ref target);
                                returnRef.Add(objRef);
                            }

                            //if (fSelection.SelectionState == BusinessObjects.FeatureSelectionStates.Selected)
                            //{
                            //    //
                            //    object target = (object)childFeature;
                            //    ObjectReference objRef = new ObjectReference(ref target);
                            //    returnRef.Add(objRef);
                            //}
                        }

                        return returnRef.ToArray();
                    }
                    public static string IdentifyRegex = "^[A-z,0-9]+$", SplitRegex = null; //example : "FeatureName"

                    public override IEvalResult[] Eval(IEvalResult[] parameters)
                    {
                        //Get parameters
                        List<BLL.BusinessObjects.Feature> featureReferences = new List<BusinessObjects.Feature>();
                        foreach (IEvalResult parameter in parameters)
                        {
                            try
                            {
                                ObjectReference objRef = (ObjectReference)parameter;
                                featureReferences.Add((BusinessObjects.Feature)objRef.GetReference());
                            }
                            catch (Exception ex)
                            {
                                throw new SyntaxIncorrectException();
                            }
                        }

                        //Get the Attributes and AttributeValues
                        List<BLL.BusinessObjects.AttributeValue> attributeValues = new List<BusinessObjects.AttributeValue>();
                        foreach (BLL.BusinessObjects.Feature featureRef in featureReferences)
                        {
                            //Get the Attribute
                            string attributeIdentifier = _syntaxString;
                            BusinessObjects.Attribute attribute = _configSession.Model.GetAttributeByIdentifier(featureRef, attributeIdentifier);

                            if (attribute != null) //if the feature doesn't have the Attribute, it is ignored
                            {
                                //Get the AttributeValue
                                BusinessObjects.AttributeValue attributeValue = _configSession.Configuration.GetAttributeValueByAttributeID(attribute.ID);
                                attributeValues.Add(attributeValue);
                            }
                        }
                        //Return a list of references pointing to the each of the childFeatures
                        List<IEvalResult> returnRef = new List<IEvalResult>();
                        foreach (BLL.BusinessObjects.AttributeValue attrValue in attributeValues)
                        {
                            object target = (object)attrValue;
                            FieldReference objRef = new FieldReference(target, "Value");
                            returnRef.Add(objRef);
                        }
                        return returnRef.ToArray();
                    }