DFAStateDescriptorT.cs
23 lines
| 572 B
| text/x-csharp
|
CSharpLexer
cin
|
r171 | using System; | ||
namespace Implab.Automaton.RegularExpressions { | ||||
cin
|
r172 | public struct DFAStateDescriptor<T> { | ||
cin
|
r171 | public readonly bool final; | ||
public readonly int[] transitions; | ||||
public readonly T[] tags; | ||||
cin
|
r172 | public DFAStateDescriptor(int size, bool final, T[] tags) { | ||
cin
|
r171 | Safe.ArgumentAssert(size >= 0, "size"); | ||
this.final = final; | ||||
this.tags = tags; | ||||
transitions = new int[size]; | ||||
for (int i = 0; i < size; i++) | ||||
transitions[i] = DFAConst.UNREACHABLE_STATE; | ||||
} | ||||
} | ||||
} | ||||