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
|
172
|
16 public override char GetSymbolByIndex(int index) {
|
|
17 return (char)index;
|
|
18 }
|
|
19
|
164
|
20 public override IEnumerable<char> InputSymbols {
|
|
21 get { return Enumerable.Range(char.MinValue, char.MaxValue).Cast<char>(); }
|
|
22 }
|
|
23 }
|
|
24 }
|