Mercurial > pub > ImplabNet
annotate Implab/Automaton/CharAlphabet.cs @ 162:0526412bbb26 ref20160224
DFA refactoring
| author | cin |
|---|---|
| date | Wed, 24 Feb 2016 08:39:53 +0300 |
| parents | |
| children |
| rev | line source |
|---|---|
| 162 | 1 using Implab; |
| 2 using System; | |
| 3 using System.Collections.Generic; | |
| 4 using System.Linq; | |
| 5 using System.Text; | |
| 6 using System.Threading.Tasks; | |
| 7 | |
| 8 namespace Implab.Automaton { | |
| 9 public class CharAlphabet: IndexedAlphabetBase<char> { | |
| 10 | |
| 11 public CharAlphabet() | |
| 12 : base(char.MaxValue + 1) { | |
| 13 } | |
| 14 | |
| 15 public override int GetSymbolIndex(char symbol) { | |
| 16 return symbol; | |
| 17 } | |
| 18 | |
| 19 public override IEnumerable<char> InputSymbols { | |
| 20 get { return Enumerable.Range(char.MinValue, char.MaxValue).Select(x => (char)x); } | |
| 21 } | |
| 22 } | |
| 23 } |
