##// END OF EJS Templates
sync
sync

File last commit:

r172:92d5278d1b10 ref20160224
r175:96a89dcb4060 ref20160224
Show More
DFAStateDescriptor.cs
26 lines | 746 B | text/x-csharp | CSharpLexer
/ Implab / Automaton / DFAStateDescriptor.cs
cin
Almost complete DFA refactoring
r164 namespace Implab.Automaton {
cin
Working on text scanner
r172 public struct DFAStateDescriptor {
cin
DFA refactoring
r165 public readonly bool final;
public readonly int[] transitions;
cin
Working on text scanner
r172 public DFAStateDescriptor(int[] transitions, bool final) {
cin
DFA refactoring
r165 this.transitions = transitions;
this.final = final;
}
cin
Working on text scanner
r172 public DFAStateDescriptor(int[] transitions) : this(transitions, false) {
cin
DFA refactoring
r165 }
cin
DFA refactoring
r169
cin
Working on text scanner
r172 public DFAStateDescriptor(int size, bool final) {
cin
DFA refactoring
r169 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 }
}