158
|
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 }
|