Esempio n. 1
0
        private static RowRegexExprNodeAlteration ExpandPermute(RowRegexExprNodePermute permute)
        {
            var e      = PermutationEnumerator.Create(permute.ChildNodes.Count);
            var parent = new RowRegexExprNodeAlteration();

            foreach (int[] indexes in e)
            {
                var concat = new RowRegexExprNodeConcatenation();
                parent.AddChildNode(concat);
                for (var i = 0; i < indexes.Length; i++)
                {
                    RowRegexExprNode toCopy = permute.ChildNodes[indexes[i]];
                    var copy = CheckedCopy(toCopy);
                    concat.AddChildNode(copy);
                }
            }
            return(parent);
        }
 public RowRegexPermuteDesc(RowRegexExprNodePermute permute, RowRegexExprNode optionalParent, int level)
 {
     Permute        = permute;
     OptionalParent = optionalParent;
     Level          = level;
 }