ByteAlphabet.cs
25 lines
| 601 B
| text/x-csharp
|
CSharpLexer
|
|
r164 | using System; | ||
| using System.Collections.Generic; | ||||
| using System.Linq; | ||||
| namespace Implab.Automaton { | ||||
| 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 IEnumerable<byte> InputSymbols { | ||||
| get { | ||||
| return Enumerable.Range(byte.MinValue, byte.MaxValue).Cast<byte>(); | ||||
| } | ||||
| } | ||||
| #endregion | ||||
| } | ||||
| } | ||||
