Class: LexerMoreAction

Inherits:
LexerAction show all
Defined in:
lib/antlr4/atn/LexerAction.rb

Overview

Implements the more lexer action by calling Lexer#more.

<p>The more command does not have any parameters, so this action is implemented as a singleton instance exposed by #INSTANCE.</p>

Constant Summary collapse

@@INSTANCE =
nil

Instance Attribute Summary

Attributes inherited from LexerAction

#actionType, #isPositionDependent

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from LexerAction

#==, #eql?, #hash

Constructor Details

#initializeLexerMoreAction

Returns a new instance of LexerMoreAction.



155
156
157
# File 'lib/antlr4/atn/LexerAction.rb', line 155

def initialize 
    super(LexerActionType::MORE)
end

Class Method Details

.INSTANCEObject



150
151
152
153
# File 'lib/antlr4/atn/LexerAction.rb', line 150

def self.INSTANCE 
   @@INSTANCE = new() if @@INSTANCE.nil? 
   @@INSTANCE 
end

Instance Method Details

#execute(lexer) ⇒ Object

<p>This action is implemented by calling Lexer#popMode.</p>



160
161
162
# File 'lib/antlr4/atn/LexerAction.rb', line 160

def execute(lexer)
    lexer.more()
end

#to_sObject



164
165
166
# File 'lib/antlr4/atn/LexerAction.rb', line 164

def to_s 
    return "more"
end