comparison Implab/Parsing/CharAlphabet.cs @ 158:130781364799 v2

refactoring, code cleanup
author cin
date Thu, 18 Feb 2016 14:34:02 +0300
parents
children
comparison
equal deleted inserted replaced
157:948c015a9011 158:130781364799
1 using Implab;
2 using System;
3 using System.Collections.Generic;
4 using System.Linq;
5 using System.Text;
6 using System.Threading.Tasks;
7
8 namespace Implab.Parsing {
9 public class CharAlphabet: IndexedAlphabetBase<char> {
10
11 public CharAlphabet()
12 : base(char.MaxValue + 1) {
13 }
14
15 public override int GetSymbolIndex(char symbol) {
16 return symbol;
17 }
18
19 public override IEnumerable<char> InputSymbols {
20 get { return Enumerable.Range(char.MinValue, char.MaxValue).Select(x => (char)x); }
21 }
22 }
23 }