1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
using Antlr4.Runtime;
using Antlr4.Runtime.Atn;
using Antlr4.Runtime.Misc;
using Antlr4.Runtime.Sharpen;
namespace Antlr4.Runtime.Atn
{
/// <summary>
/// Implements the
/// <c>more</c>
/// lexer action by calling
/// <see cref="Antlr4.Runtime.Lexer.More()"/>
/// .
/// <p>The
/// <c>more</c>
/// command does not have any parameters, so this action is
/// implemented as a singleton instance exposed by
/// <see cref="Instance"/>
/// .</p>
/// </summary>
/// <author>Sam Harwell</author>
/// <since>4.2</since>
public sealed class LexerMoreAction : ILexerAction
{
/// <summary>Provides a singleton instance of this parameterless lexer action.</summary>
/// <remarks>Provides a singleton instance of this parameterless lexer action.</remarks>
public static readonly Antlr4.Runtime.Atn.LexerMoreAction Instance = new Antlr4.Runtime.Atn.LexerMoreAction();
/// <summary>
/// Constructs the singleton instance of the lexer
/// <c>more</c>
/// command.
/// </summary>
private LexerMoreAction()
{
}
/// <summary><inheritDoc/></summary>
/// <returns>
/// This method returns
/// <see cref="LexerActionType.More"/>
/// .
/// </returns>
public LexerActionType ActionType
{
get
{
return LexerActionType.More;
}
}
/// <summary><inheritDoc/></summary>
/// <returns>
/// This method returns
/// <see langword="false"/>
/// .
/// </returns>
public bool IsPositionDependent
{
get
{
return false;
}
}
/// <summary>
/// <inheritDoc/>
/// <p>This action is implemented by calling
/// <see cref="Antlr4.Runtime.Lexer.More()"/>
/// .</p>
/// </summary>
public void Execute(Lexer lexer)
{
lexer.More();
}
public override int GetHashCode()
{
int hash = MurmurHash.Initialize();
hash = MurmurHash.Update(hash, (int)(ActionType));
return MurmurHash.Finish(hash, 1);
}
public override bool Equals(object obj)
{
return obj == this;
}
public override string ToString()
{
return "more";
}
}
}