Mercurial > pub > ImplabNet
comparison Implab/Automaton/DFAStateDescriptor.cs @ 172:92d5278d1b10 ref20160224
Working on text scanner
author | cin |
---|---|
date | Mon, 14 Mar 2016 01:19:38 +0300 |
parents | 54270c2f29f2 |
children |
comparison
equal
deleted
inserted
replaced
171:0f70905b4652 | 172:92d5278d1b10 |
---|---|
1 namespace Implab.Automaton { | 1 namespace Implab.Automaton { |
2 public struct DFAStateDescriptior { | 2 public struct DFAStateDescriptor { |
3 public readonly bool final; | 3 public readonly bool final; |
4 public readonly int[] transitions; | 4 public readonly int[] transitions; |
5 | 5 |
6 | 6 |
7 public DFAStateDescriptior(int[] transitions, bool final) { | 7 public DFAStateDescriptor(int[] transitions, bool final) { |
8 this.transitions = transitions; | 8 this.transitions = transitions; |
9 this.final = final; | 9 this.final = final; |
10 } | 10 } |
11 | 11 |
12 public DFAStateDescriptior(int[] transitions) : this(transitions, false) { | 12 public DFAStateDescriptor(int[] transitions) : this(transitions, false) { |
13 } | 13 } |
14 | 14 |
15 public DFAStateDescriptior(int size, bool final) { | 15 public DFAStateDescriptor(int size, bool final) { |
16 Safe.ArgumentInRange(size, 0, int.MaxValue, "size"); | 16 Safe.ArgumentInRange(size, 0, int.MaxValue, "size"); |
17 | 17 |
18 this.final = final; | 18 this.final = final; |
19 | 19 |
20 transitions = new int[size]; | 20 transitions = new int[size]; |