internal virtual ENFA_Transition NewRegexTransition(RegexTransitionType transitionType, ENFA_Base nextState) { if (Controller.ParserType == ParserType.Grammar) { throw new ENFA_GrammarBuild_Exception(ErrorText.TryingToCreateNewRegexTransitionInGrammar); } foreach (ENFA_Transition transition in GetTransitions) { ENFA_Base state = transition.Transition(); if ((transition as ENFA_Regex_Transition).TransitionType == transitionType && state.Equals(nextState)) { return(transition); } } return((Controller.Factory as ENFA_Regex_Factory).CreateRegexTransition(transitionType, nextState)); }
public ENFA_Regex_Transition(RegexTransitionType transitionType, ENFA_Base nextState) : base(nextState) { _transitionType = transitionType; _literal = new List <char>(); }
public ENFA_Regex_Transition CreateRegexTransition(RegexTransitionType transitionType, ENFA_Base nextState) { return(new ENFA_Regex_Transition(transitionType, nextState)); }