Mercurial > pub > ImplabNet
annotate Implab/Formats/CharAlphabet.cs @ 165:e227e78d72e4 ref20160224
DFA refactoring
author | cin |
---|---|
date | Mon, 29 Feb 2016 02:02:17 +0300 |
parents | ec35731ae299 |
children | 92d5278d1b10 |
rev | line source |
---|---|
165 | 1 using System.Collections.Generic; |
164 | 2 using System.Linq; |
165 | 3 using Implab.Automaton; |
164 | 4 |
165 | 5 namespace Implab.Formats { |
164 | 6 public class CharAlphabet: IndexedAlphabetBase<char> { |
7 | |
8 public CharAlphabet() | |
9 : base(char.MaxValue + 1) { | |
10 } | |
11 | |
12 public override int GetSymbolIndex(char symbol) { | |
13 return symbol; | |
14 } | |
15 | |
16 public override IEnumerable<char> InputSymbols { | |
17 get { return Enumerable.Range(char.MinValue, char.MaxValue).Cast<char>(); } | |
18 } | |
19 } | |
20 } |