public final class LexerSkipAction extends java.lang.Object implements LexerAction
skip lexer action by calling Lexer.skip().
The skip command does not have any parameters, so this action is
implemented as a singleton instance exposed by INSTANCE.
| Modifier and Type | Field and Description |
|---|---|
static LexerSkipAction |
INSTANCE
Provides a singleton instance of this parameterless lexer action.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
void |
execute(Lexer lexer)
Execute the lexer action in the context of the specified
Lexer. |
LexerActionType |
getActionType()
Gets the serialization type of the lexer action.
|
int |
hashCode() |
boolean |
isPositionDependent()
Gets whether the lexer action is position-dependent.
|
java.lang.String |
toString() |
public static final LexerSkipAction INSTANCE
public LexerActionType getActionType()
getActionType in interface LexerActionLexerActionType.SKIP.public boolean isPositionDependent()
CharStream
index at the time the action is executed.
Many lexer commands, including type, skip, and
more, do not check the input index during their execution.
Actions like this are position-independent, and may be stored more
efficiently as part of the LexerATNConfig.lexerActionExecutor.
isPositionDependent in interface LexerActionfalse.public void execute(Lexer lexer)
Lexer.
For position-dependent actions, the input stream must already be positioned correctly prior to calling this method.
This action is implemented by calling Lexer.skip().
execute in interface LexerActionlexer - The lexer instance.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object