##// END OF EJS Templates
sync
sync

File last commit:

r172:92d5278d1b10 ref20160224
r175:96a89dcb4060 ref20160224
Show More
ByteAlphabet.cs
29 lines | 711 B | text/x-csharp | CSharpLexer
using System.Collections.Generic;
using System.Linq;
using Implab.Automaton;
namespace Implab.Formats {
public class ByteAlphabet : IndexedAlphabetBase<byte> {
public ByteAlphabet() : base(byte.MaxValue + 1){
}
#region implemented abstract members of IndexedAlphabetBase
public override int GetSymbolIndex(byte symbol) {
return (int)symbol;
}
public override byte GetSymbolByIndex(int index) {
return (byte)index;
}
public IEnumerable<byte> InputSymbols {
get {
return Enumerable.Range(byte.MinValue, byte.MaxValue).Cast<byte>();
}
}
#endregion
}
}