comparison Implab/Parsing/Alphabet.cs @ 59:21611344d366

code cleanup
author cin
date Wed, 18 Jun 2014 03:54:02 +0400
parents c0bf853aa04f
children
comparison
equal deleted inserted replaced
58:1710dcda34bb 59:21611344d366
6 using System.Threading.Tasks; 6 using System.Threading.Tasks;
7 7
8 namespace Implab.Parsing { 8 namespace Implab.Parsing {
9 public class Alphabet: AlphabetBase<char> { 9 public class Alphabet: AlphabetBase<char> {
10 10
11 public Alphabet()
12 : base(char.MaxValue + 1) {
13 }
14
11 public override int GetSymbolIndex(char symbol) { 15 public override int GetSymbolIndex(char symbol) {
12 return symbol; 16 return symbol;
13 } 17 }
14 18
15 public override IEnumerable<char> InputSymbols { 19 public override IEnumerable<char> InputSymbols {
16 get { return Enumerable.Range(char.MinValue, char.MaxValue).Select(x => (char)x); } 20 get { return Enumerable.Range(char.MinValue, char.MaxValue).Select(x => (char)x); }
17 } 21 }
18
19 protected override int MapSize {
20 get { return char.MaxValue + 1; }
21 }
22 } 22 }
23 } 23 }