Exemplo n.º 1
0
        private static Nfa Character(RegexCharacter character)
        {
            var start = new NfaState();
            var end   = new NfaState();

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

            start.AddTransition(terminal, end);

            return(new Nfa(start, end));
        }
 private static INfa Character(RegexCharacter character)
 {
     var start = new NfaState();
     var end = new NfaState();
     var terminal = new CharacterTerminal(character.Value);
     var transition = new TerminalNfaTransition(
         terminal: terminal,
         target: end);
     start.AddTransistion(transition);
     return new Nfa(start, end);
 }
        private static INfa Character(RegexCharacter character)
        {
            var start      = new NfaState();
            var end        = new NfaState();
            var terminal   = new CharacterTerminal(character.Value);
            var transition = new TerminalNfaTransition(
                terminal: terminal,
                target: end);

            start.AddTransistion(transition);
            return(new Nfa(start, end));
        }
Exemplo n.º 4
0
 public RegexAtomCharacter(RegexCharacter character)
 {
     Character = character;
     _hashCode = ComputeHashCode();
 }
Exemplo n.º 5
0
 public RegexAtomCharacter(RegexCharacter character)
 {
     Character = character;
     _hashCode = ComputeHashCode();
 }