Mercurial > pub > ImplabNet
annotate Implab/Formats/CharAlphabet.cs @ 171:0f70905b4652 ref20160224
Working on regular DFA
author | cin |
---|---|
date | Thu, 10 Mar 2016 01:19:33 +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 } |