ByteAlphabet.cs
23 lines
| 542 B
| text/x-csharp
|
CSharpLexer
|
|
r289 | using System.Collections.Generic; | ||
| using System.Linq; | ||||
| using Implab.Automaton; | ||||
| namespace Implab.Formats { | ||||
| public class ByteAlphabet : IndexedAlphabetBase<byte> { | ||||
| #region implemented abstract members of IndexedAlphabetBase | ||||
| public override int GetSymbolIndex(byte symbol) { | ||||
| return (int)symbol; | ||||
| } | ||||
| public IEnumerable<byte> InputSymbols { | ||||
| get { | ||||
| return Enumerable.Range(byte.MinValue, byte.MaxValue).Cast<byte>(); | ||||
| } | ||||
| } | ||||
| #endregion | ||||
| } | ||||
| } | ||||
