annotate Implab/Automaton/RegularExpressions/SymbolToken.cs @ 216:1e082fb67a46 v2

Fixed component container
author cin
date Tue, 25 Apr 2017 19:51:33 +0300
parents a0ff6a0e9c44
children
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 /// </summary>
177
a0ff6a0e9c44 refactoring
cin
parents: 162
diff changeset
7 public class SymbolToken: Token {
162
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
8 int m_value;
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
9
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
10 public int Value {
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
11 get { return m_value; }
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
12 }
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
13
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
14 public SymbolToken(int value) {
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
15 m_value = value;
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
16 }
177
a0ff6a0e9c44 refactoring
cin
parents: 162
diff changeset
17 public override void Accept(IVisitor visitor) {
162
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
18 Safe.ArgumentNotNull(visitor, "visitor");
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
19
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
20 visitor.Visit(this);
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
21 }
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
22
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
23 public override string ToString() {
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
24 return Value.ToString();
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
25 }
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
26 }
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
27 }