##// END OF EJS Templates
DFA refactoring, rx based dfa.
DFA refactoring, rx based dfa.

File last commit:

r169:54270c2f29f2 ref20160224
r170:181119ef3b39 ref20160224
Show More
DFAStateDescriptor.cs
26 lines | 750 B | text/x-csharp | CSharpLexer
/ Implab / Automaton / DFAStateDescriptor.cs
cin
Almost complete DFA refactoring
r164 namespace Implab.Automaton {
cin
DFA refactoring
r165 public struct DFAStateDescriptior {
public readonly bool final;
public readonly int[] transitions;
public DFAStateDescriptior(int[] transitions, bool final) {
this.transitions = transitions;
this.final = final;
}
public DFAStateDescriptior(int[] transitions) : this(transitions, false) {
}
cin
DFA refactoring
r169
public DFAStateDescriptior(int size, bool final) {
Safe.ArgumentInRange(size, 0, int.MaxValue, "size");
this.final = final;
transitions = new int[size];
for (int i = 0; i < size; i++)
transitions[i] = DFAConst.UNREACHABLE_STATE;
}
cin
DFA refactoring
r162 }
}