162
|
1 using Implab;
|
|
2
|
|
3 namespace Implab.Automaton.RegularExpressions {
|
|
4 /// <summary>
|
|
5 /// Выражение, соответсвующее одному символу.
|
|
6 /// </summary>
|
177
|
7 public class SymbolToken: Token {
|
162
|
8 int m_value;
|
|
9
|
|
10 public int Value {
|
|
11 get { return m_value; }
|
|
12 }
|
|
13
|
|
14 public SymbolToken(int value) {
|
|
15 m_value = value;
|
|
16 }
|
177
|
17 public override void Accept(IVisitor visitor) {
|
162
|
18 Safe.ArgumentNotNull(visitor, "visitor");
|
|
19
|
|
20 visitor.Visit(this);
|
|
21 }
|
|
22
|
|
23 public override string ToString() {
|
|
24 return Value.ToString();
|
|
25 }
|
|
26 }
|
|
27 }
|