public PatternMatch Match(AmbiguousPhrase phrase, IContinuation succ, IFailure fail) { //IArena arena = new QueueArena(); //arena.Call(); return(null); }
protected List <PatternMatch> RecursiveMatch(AmbiguousPhrase subject, PatternMatch before, uint index) { List <PatternMatch> matches = matchers[(int)index].AllMatches(subject, before); if (matches != null) { if (index == matchers.Count - 1) { return(matches); } List <PatternMatch> allMatches = new List <PatternMatch>(); foreach (PatternMatch match in matches) { List <PatternMatch> matchMatches = RecursiveMatch(subject, match, index + 1); if (matchMatches != null) { allMatches.AddRange(matchMatches); } } return(allMatches); } return(null); }
public PatternMatch Match(AmbiguousPhrase phrase, IContinuation succ, IFailure fail) { //IArena arena = new QueueArena(); //arena.Call(); return null; }
public List<PatternMatch> AllMatches(AmbiguousPhrase subject, List<PatternMatch> before) { List<PatternMatch> after = new List<PatternMatch>(); foreach (PatternMatch beforeMatch in before) { List<PatternMatch> afterMatch = AllMatches(subject, beforeMatch); if (afterMatch != null) after.AddRange(afterMatch); } return after; }
public override List<PatternMatch> AllMatches(AmbiguousPhrase subject, PatternMatch before) { List<PatternMatch> result = new List<PatternMatch>(); if (caseSensitive) { if (pattern == subject.StringAt(before.End)) result.Add(before.MatchExtendedBy(1)); } else if (pattern == subject.StringAt(before.End).ToLower()) result.Add(before.MatchExtendedBy(1)); return result; }
public override List <PatternMatch> AllMatches(AmbiguousPhrase subject, PatternMatch before) { List <PatternMatch> matches = new List <PatternMatch>(); PatternMatch attempt = before; while (!attempt.End.Equals(subject.End)) { matches.Add(attempt); AmbiguousPhrasePointer next = attempt.Start.PointerFurtheredBy(1); attempt = new PatternMatch(next); } return(matches); }
public List <PatternMatch> AllMatches(AmbiguousPhrase subject, List <PatternMatch> before) { List <PatternMatch> after = new List <PatternMatch>(); foreach (PatternMatch beforeMatch in before) { List <PatternMatch> afterMatch = AllMatches(subject, beforeMatch); if (afterMatch != null) { after.AddRange(afterMatch); } } return(after); }
public override List <PatternMatch> AllMatches(AmbiguousPhrase subject, PatternMatch before) { List <PatternMatch> result = new List <PatternMatch>(); if (caseSensitive) { if (pattern == subject.StringAt(before.End)) { result.Add(before.MatchExtendedBy(1)); } } else if (pattern == subject.StringAt(before.End).ToLower()) { result.Add(before.MatchExtendedBy(1)); } return(result); }
protected List<PatternMatch> RecursiveMatch(AmbiguousPhrase subject, PatternMatch before, uint index) { List<PatternMatch> matches = matchers[(int) index].AllMatches(subject, before); if (matches != null) { if (index == matchers.Count - 1) return matches; List<PatternMatch> allMatches = new List<PatternMatch>(); foreach (PatternMatch match in matches) { List<PatternMatch> matchMatches = RecursiveMatch(subject, match, index+1); if (matchMatches != null) allMatches.AddRange(matchMatches); } return allMatches; } return null; }
public override List <PatternMatch> AllMatches(AmbiguousPhrase subject, PatternMatch before) { return(RecursiveMatch(subject, before, 0)); }
public virtual List <PatternMatch> AllMatches(AmbiguousPhrase subject, PatternMatch before) { return(null); }
public List <PatternMatch> AllMatches(AmbiguousPhrase subject) { PatternMatch before = new PatternMatch(); return(AllMatches(subject, before)); }
public virtual List<PatternMatch> AllMatches(AmbiguousPhrase subject, PatternMatch before) { return null; }
public List<PatternMatch> AllMatches(AmbiguousPhrase subject) { PatternMatch before = new PatternMatch(); return AllMatches(subject, before); }
public override List<PatternMatch> AllMatches(AmbiguousPhrase subject, PatternMatch before) { return RecursiveMatch(subject, before, 0); }