private static INfa Character(RegexCharacter character)
        {
            var start = new NfaState();
            var end   = new NfaState();

            var terminal = CreateTerminalForCharacter(character.Value, character.IsEscaped, false);

            var transition = new TerminalNfaTransition(
                terminal: terminal,
                target: end);

            start.AddTransistion(transition);

            return(new Nfa(start, end));
        }
Ejemplo n.º 2
0
 public RegexAtomCharacter(RegexCharacter character)
 {
     Character = character;
     _hashCode = ComputeHashCode();
 }