annotate Implab/Formats/CharAlphabet.cs @ 164:ec35731ae299 ref20160224

Almost complete DFA refactoring
author cin
date Thu, 25 Feb 2016 02:11:13 +0300
parents
children e227e78d72e4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
164
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
1 using Implab;
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
2 using System;
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
3 using System.Collections.Generic;
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
4 using System.Linq;
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
5 using System.Text;
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
6 using System.Threading.Tasks;
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
7
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
8 namespace Implab.Automaton {
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
9 public class CharAlphabet: IndexedAlphabetBase<char> {
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
10
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
11 public CharAlphabet()
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
12 : base(char.MaxValue + 1) {
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
13 }
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
14
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
15 public override int GetSymbolIndex(char symbol) {
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
16 return symbol;
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
17 }
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
18
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
19 public override IEnumerable<char> InputSymbols {
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
20 get { return Enumerable.Range(char.MinValue, char.MaxValue).Cast<char>(); }
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
21 }
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
22 }
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
23 }