public RepeatMatcher(Matcher <T> matcher) { this.matcher = matcher; }
public ChoiceMatcher(Matcher <T> matcher1, Matcher <T> matcher2) { _matcher1 = matcher1; _matcher2 = matcher2; }
/// <summary> /// Matcher equivalent to (m_1 ... m_n) /// </summary> public static Matcher <T> Sequence <T>(params Matcher <T>[] matchers) { return(Matcher <T> .Sequence(matchers)); }
/// <summary> /// Matcher that matches an element if the provide predicate returns true. /// </summary> public static Matcher <T> Single <T>(Func <T, bool> predicate, string description) { return(Matcher <T> .Single(predicate, description)); }
/// <summary> /// Matcher equivalent to (m+) /// </summary> public static Matcher <T> OneOrMore <T>(Matcher <T> matcher) { return(Matcher <T> .OneOrMore(matcher)); }
/// <summary> /// Matcher equivalent to (m_1|m_2|...|m_n) /// </summary> public static Matcher <T> Choice <T>(params Matcher <T>[] matchers) { return(Matcher <T> .Choice(matchers)); }
public RepeatMatcher(Matcher <T> matcher) { _matcher = matcher; }
/// <summary> /// Matcher equivalent to (m*) /// </summary> public static Matcher <T> Repeat <T>(Matcher <T> matcher) { return(Matcher <T> .Repeat(matcher)); }
internal static Matcher <T> Choice(Matcher <T> matcher1, Matcher <T> matcher2) { return(new ChoiceMatcher(matcher1, matcher2)); }
internal static Matcher <T> OneOrMore(Matcher <T> matcher) { // m+ is the same as (m m*) return(Sequence(matcher, Repeat(matcher))); }
internal static Matcher <T> Repeat(Matcher <T> matcher) { return(new RepeatMatcher(matcher)); }
public ChoiceMatcher(Matcher <T> matcher1, Matcher <T> matcher2) { this.matcher1 = matcher1; this.matcher2 = matcher2; }
internal static Matcher <T> Repeat(Matcher <T> matcher) => new RepeatMatcher(matcher);