164
|
1 namespace Implab.Automaton {
|
165
|
2 public struct DFAStateDescriptior {
|
|
3 public readonly bool final;
|
|
4 public readonly int[] transitions;
|
|
5
|
|
6
|
|
7 public DFAStateDescriptior(int[] transitions, bool final) {
|
|
8 this.transitions = transitions;
|
|
9 this.final = final;
|
|
10 }
|
|
11
|
|
12 public DFAStateDescriptior(int[] transitions) : this(transitions, false) {
|
|
13 }
|
169
|
14
|
|
15 public DFAStateDescriptior(int size, bool final) {
|
|
16 Safe.ArgumentInRange(size, 0, int.MaxValue, "size");
|
|
17
|
|
18 this.final = final;
|
|
19
|
|
20 transitions = new int[size];
|
|
21
|
|
22 for (int i = 0; i < size; i++)
|
|
23 transitions[i] = DFAConst.UNREACHABLE_STATE;
|
|
24 }
|
162
|
25 }
|
|
26 }
|