internal void Transition(char?lastChar, char?nextChar) { List <ENFA_Regex_Match> validPaths = ValidPaths(lastChar, nextChar); if (validPaths.Count == 0) { // Kill MatchPath Kill(); } else { // Split matchPath for (int counter = 0; counter < validPaths.Count - 1; counter += 1) { ENFA_Regex_MatchPath clone = Clone(); Node.List.AddBefore(Node, clone.Node); if (!clone.Transition(validPaths[counter])) { if (!clone.IsPatternEnd) { clone.Transition(lastChar, nextChar); } } } /* Transition once again if transition consumes no character */ if (!Transition(validPaths[validPaths.Count - 1])) { if (!IsPatternEnd) { Transition(lastChar, nextChar); } } } }
public ENFA_Regex_MatchPath(ENFA_Regex_MatchPath cloneThis) { _controller = cloneThis.Controller; _node = cloneThis.Node; _patternLocation = cloneThis.PatternLocation; }