##// END OF EJS Templates
Working on regular DFA
Working on regular DFA

File last commit:

r171:0f70905b4652 ref20160224
r171:0f70905b4652 ref20160224
Show More
DFAStateDescriptorT.cs
23 lines | 574 B | text/x-csharp | CSharpLexer
cin
Working on regular DFA
r171 using System;
namespace Implab.Automaton.RegularExpressions {
public struct DFAStateDescriptorT<T> {
public readonly bool final;
public readonly int[] transitions;
public readonly T[] tags;
public DFAStateDescriptorT(int size, bool final, T[] tags) {
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;
}
}
}