Exemplo n.º 1
0
            private INonbacktrackingAssertion ParseNonbacktrackingAssertion()
            {
                ++index; // swallow the '>'
                var item = Parse();

                return(NonbacktrackingAssertion.Of(item));
            }
Exemplo n.º 2
0
        /// <summary>
        /// Creates a group that cannot be backtracked.
        /// </summary>
        /// <returns>The non-backtracked expression group.</returns>
        public static INonbacktrackingAssertion From(IEnumerable <IExpression> members)
        {
            if (members == null)
            {
                throw new ArgumentNullException(nameof(members));
            }
            var group = new NonbacktrackingAssertion();

            foreach (var expression in members)
            {
                group.Add(expression);
            }
            return(group);
        }