annotate Implab/Automaton/RegularExpressions/EndTokenT.cs @ 177:a0ff6a0e9c44 ref20160224

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