annotate Implab/Automaton/RegularExpressions/EndToken.cs @ 169:54270c2f29f2 ref20160224

DFA refactoring
author cin
date Thu, 03 Mar 2016 08:41:02 +0300
parents 0526412bbb26
children 181119ef3b39
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
162
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
1 using Implab;
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
2
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
3 namespace Implab.Automaton.RegularExpressions {
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
4 /// <summary>
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
5 /// Конечный символ расширенного регулярного выражения, при построении ДКА
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
6 /// используется для определения конечных состояний.
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
7 /// </summary>
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
8 public class EndToken<TTag>: Token<TTag> {
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
9
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
10 TTag m_tag;
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
11
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
12 public EndToken(TTag tag) {
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
13 m_tag = tag;
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
14 }
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
15
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
16 public EndToken()
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
17 : this(0) {
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
18 }
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
19
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
20 public TTag Tag {
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
21 get { return m_tag; }
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
22 }
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
23
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
24 public override void Accept(IVisitor<TTag> visitor) {
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
25 Safe.ArgumentNotNull(visitor, "visitor");
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
26 visitor.Visit(this);
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
27 }
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
28 public override string ToString() {
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
29 return "#";
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
30 }
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
31 }
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
32 }