Mercurial > pub > ImplabNet
annotate Implab/Formats/CharAlphabet.cs @ 166:b84cdbe82e7f ref20160224
sync
author | cin |
---|---|
date | Mon, 29 Feb 2016 18:41:01 +0300 |
parents | e227e78d72e4 |
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 } |