##// END OF EJS Templates
sync
sync

File last commit:

r172:92d5278d1b10 ref20160224
r175:96a89dcb4060 ref20160224
Show More
CharAlphabet.cs
24 lines | 634 B | text/x-csharp | CSharpLexer
using System.Collections.Generic;
using System.Linq;
using Implab.Automaton;
namespace Implab.Formats {
public class CharAlphabet: IndexedAlphabetBase<char> {
public CharAlphabet()
: base(char.MaxValue + 1) {
}
public override int GetSymbolIndex(char symbol) {
return symbol;
}
public override char GetSymbolByIndex(int index) {
return (char)index;
}
public override IEnumerable<char> InputSymbols {
get { return Enumerable.Range(char.MinValue, char.MaxValue).Cast<char>(); }
}
}
}