Package org.apache.groovy.parser.antlr4
Class GroovyLexer
java.lang.Object
org.antlr.v4.runtime.Recognizer<java.lang.Integer,org.antlr.v4.runtime.atn.LexerATNSimulator>
org.antlr.v4.runtime.Lexer
org.apache.groovy.parser.antlr4.AbstractLexer
org.apache.groovy.parser.antlr4.GroovyLexer
- All Implemented Interfaces:
org.antlr.v4.runtime.TokenSource
,SyntaxErrorReportable
- Direct Known Subclasses:
GroovyLangLexer
public class GroovyLexer extends AbstractLexer
-
Field Summary
Fields Modifier and Type Field Description static org.antlr.v4.runtime.atn.ATN
_ATN
static java.lang.String
_serializedATN
static int
ABSTRACT
static int
ADD
static int
ADD_ASSIGN
static int
AND
static int
AND_ASSIGN
static int
ARROW
static int
AS
static int
ASSERT
static int
ASSIGN
static int
AT
static int
BITAND
static int
BITNOT
static int
BITOR
static int
BooleanLiteral
static int
BREAK
static int
BuiltInPrimitiveType
static int
CapitalizedIdentifier
static int
CASE
static int
CATCH
static java.lang.String[]
channelNames
static int
CLASS
static int
COLON
static int
COMMA
static int
CONST
static int
CONTINUE
static int
DEC
static int
DEF
static int
DEFAULT
static int
DIV
static int
DIV_ASSIGN
static int
DO
static int
DOLLAR_SLASHY_GSTRING_MODE
static int
DOT
static int
DQ_GSTRING_MODE
static int
ELLIPSIS
static int
ELSE
static int
ELVIS
static int
ELVIS_ASSIGN
static int
ENUM
static int
EQUAL
static int
EXTENDS
static int
FINAL
static int
FINALLY
static int
FloatingPointLiteral
static int
FOR
static int
GE
static int
GOTO
static int
GSTRING_PATH_MODE
static int
GSTRING_TYPE_SELECTOR_MODE
static int
GStringBegin
static int
GStringEnd
static int
GStringPart
static int
GStringPathPart
static int
GT
static int
IDENTICAL
static int
Identifier
static int
IF
static int
IMPLEMENTS
static int
IMPORT
static int
IN
static int
INC
static int
INSTANCEOF
static int
IntegerLiteral
static int
INTERFACE
static int
LBRACE
static int
LBRACK
static int
LE
static int
LPAREN
static int
LSHIFT_ASSIGN
static int
LT
static int
METHOD_POINTER
static int
METHOD_REFERENCE
static int
MOD
static int
MOD_ASSIGN
static java.lang.String[]
modeNames
static int
MUL
static int
MUL_ASSIGN
static int
NATIVE
static int
NEW
static int
NL
static int
NOT
static int
NOT_IDENTICAL
static int
NOT_IN
static int
NOT_INSTANCEOF
static int
NOTEQUAL
static int
NullLiteral
static int
OR
static int
OR_ASSIGN
static int
PACKAGE
static int
POWER
static int
POWER_ASSIGN
static int
PRIVATE
static int
PROTECTED
static int
PUBLIC
static int
QUESTION
static int
RANGE_EXCLUSIVE
static int
RANGE_INCLUSIVE
static int
RBRACE
static int
RBRACK
static int
REGEX_FIND
static int
REGEX_MATCH
static int
RETURN
static int
RollBackOne
static int
RPAREN
static int
RSHIFT_ASSIGN
static java.lang.String[]
ruleNames
static int
SAFE_CHAIN_DOT
static int
SAFE_DOT
static int
SEMI
static int
SH_COMMENT
static int
SLASHY_GSTRING_MODE
static int
SPACESHIP
static int
SPREAD_DOT
static int
STATIC
static int
STRICTFP
static int
StringLiteral
static int
SUB
static int
SUB_ASSIGN
static int
SUPER
static int
SWITCH
static int
SYNCHRONIZED
static int
TDQ_GSTRING_MODE
static int
THIS
static int
THREADSAFE
static int
THROW
static int
THROWS
static java.lang.String[]
tokenNames
Deprecated.static int
TRAIT
static int
TRANSIENT
static int
TRY
static int
UNEXPECTED_CHAR
static int
URSHIFT_ASSIGN
static int
VAR
static org.antlr.v4.runtime.Vocabulary
VOCABULARY
static int
VOID
static int
VOLATILE
static int
WHILE
static int
WS
static int
XOR
static int
XOR_ASSIGN
Fields inherited from class org.antlr.v4.runtime.Lexer
_channel, _factory, _hitEOF, _input, _mode, _modeStack, _text, _token, _tokenFactorySourcePair, _tokenStartCharIndex, _tokenStartCharPositionInLine, _tokenStartLine, _type, DEFAULT_MODE, DEFAULT_TOKEN_CHANNEL, HIDDEN, MAX_CHAR_VALUE, MIN_CHAR_VALUE, MORE, SKIP
Fields inherited from class org.antlr.v4.runtime.Recognizer
_interp, EOF
Fields inherited from interface org.apache.groovy.parser.antlr4.SyntaxErrorReportable
NO_OFFSET
-
Constructor Summary
Constructors Constructor Description GroovyLexer(org.antlr.v4.runtime.CharStream input)
-
Method Summary
Modifier and Type Method Description void
action(org.antlr.v4.runtime.RuleContext _localctx, int ruleIndex, int actionIndex)
void
emit(org.antlr.v4.runtime.Token token)
Record the index and token type of the current token while emitting tokens.protected void
enterParenCallback(java.lang.String text)
protected void
exitParenCallback(java.lang.String text)
java.lang.String[]
getChannelNames()
int
getErrorColumn()
int
getErrorLine()
java.lang.String
getGrammarFileName()
java.lang.String[]
getModeNames()
java.lang.String[]
getRuleNames()
java.lang.String
getSerializedATN()
int
getSyntaxErrorSource()
java.lang.String[]
getTokenNames()
Deprecated.org.antlr.v4.runtime.Vocabulary
getVocabulary()
boolean
isErrorIgnored()
int
popMode()
protected void
rollbackOneChar()
just a hook, which will be overrided by GroovyLangLexerboolean
sempred(org.antlr.v4.runtime.RuleContext _localctx, int ruleIndex, int predIndex)
void
setErrorIgnored(boolean errorIgnored)
Methods inherited from class org.antlr.v4.runtime.Lexer
emit, emitEOF, getAllTokens, getChannel, getCharErrorDisplay, getCharIndex, getCharPositionInLine, getErrorDisplay, getErrorDisplay, getInputStream, getLine, getSourceName, getText, getToken, getTokenFactory, getType, mode, more, nextToken, notifyListeners, pushMode, recover, recover, reset, setChannel, setCharPositionInLine, setInputStream, setLine, setText, setToken, setTokenFactory, setType, skip, validateInputStream
Methods inherited from class org.antlr.v4.runtime.Recognizer
addErrorListener, getATN, getErrorHeader, getErrorListenerDispatch, getErrorListeners, getInterpreter, getParseInfo, getRuleIndexMap, getState, getTokenErrorDisplay, getTokenType, getTokenTypeMap, precpred, removeErrorListener, removeErrorListeners, setInterpreter, setState
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.groovy.parser.antlr4.SyntaxErrorReportable
genPositionInfo, genPositionInfo, require, require, require, require, require, require, throwSyntaxError, throwSyntaxError
-
Field Details
-
StringLiteral
public static final int StringLiteral- See Also:
- Constant Field Values
-
GStringBegin
public static final int GStringBegin- See Also:
- Constant Field Values
-
GStringEnd
public static final int GStringEnd- See Also:
- Constant Field Values
-
GStringPart
public static final int GStringPart- See Also:
- Constant Field Values
-
GStringPathPart
public static final int GStringPathPart- See Also:
- Constant Field Values
-
RollBackOne
public static final int RollBackOne- See Also:
- Constant Field Values
-
AS
public static final int AS- See Also:
- Constant Field Values
-
DEF
public static final int DEF- See Also:
- Constant Field Values
-
IN
public static final int IN- See Also:
- Constant Field Values
-
TRAIT
public static final int TRAIT- See Also:
- Constant Field Values
-
THREADSAFE
public static final int THREADSAFE- See Also:
- Constant Field Values
-
VAR
public static final int VAR- See Also:
- Constant Field Values
-
BuiltInPrimitiveType
public static final int BuiltInPrimitiveType- See Also:
- Constant Field Values
-
ABSTRACT
public static final int ABSTRACT- See Also:
- Constant Field Values
-
ASSERT
public static final int ASSERT- See Also:
- Constant Field Values
-
BREAK
public static final int BREAK- See Also:
- Constant Field Values
-
CASE
public static final int CASE- See Also:
- Constant Field Values
-
CATCH
public static final int CATCH- See Also:
- Constant Field Values
-
CLASS
public static final int CLASS- See Also:
- Constant Field Values
-
CONST
public static final int CONST- See Also:
- Constant Field Values
-
CONTINUE
public static final int CONTINUE- See Also:
- Constant Field Values
-
DEFAULT
public static final int DEFAULT- See Also:
- Constant Field Values
-
DO
public static final int DO- See Also:
- Constant Field Values
-
ELSE
public static final int ELSE- See Also:
- Constant Field Values
-
ENUM
public static final int ENUM- See Also:
- Constant Field Values
-
EXTENDS
public static final int EXTENDS- See Also:
- Constant Field Values
-
FINAL
public static final int FINAL- See Also:
- Constant Field Values
-
FINALLY
public static final int FINALLY- See Also:
- Constant Field Values
-
FOR
public static final int FOR- See Also:
- Constant Field Values
-
IF
public static final int IF- See Also:
- Constant Field Values
-
GOTO
public static final int GOTO- See Also:
- Constant Field Values
-
IMPLEMENTS
public static final int IMPLEMENTS- See Also:
- Constant Field Values
-
IMPORT
public static final int IMPORT- See Also:
- Constant Field Values
-
INSTANCEOF
public static final int INSTANCEOF- See Also:
- Constant Field Values
-
INTERFACE
public static final int INTERFACE- See Also:
- Constant Field Values
-
NATIVE
public static final int NATIVE- See Also:
- Constant Field Values
-
NEW
public static final int NEW- See Also:
- Constant Field Values
-
PACKAGE
public static final int PACKAGE- See Also:
- Constant Field Values
-
PRIVATE
public static final int PRIVATE- See Also:
- Constant Field Values
-
PROTECTED
public static final int PROTECTED- See Also:
- Constant Field Values
-
PUBLIC
public static final int PUBLIC- See Also:
- Constant Field Values
-
RETURN
public static final int RETURN- See Also:
- Constant Field Values
-
STATIC
public static final int STATIC- See Also:
- Constant Field Values
-
STRICTFP
public static final int STRICTFP- See Also:
- Constant Field Values
-
SUPER
public static final int SUPER- See Also:
- Constant Field Values
-
SWITCH
public static final int SWITCH- See Also:
- Constant Field Values
-
SYNCHRONIZED
public static final int SYNCHRONIZED- See Also:
- Constant Field Values
-
THIS
public static final int THIS- See Also:
- Constant Field Values
-
THROW
public static final int THROW- See Also:
- Constant Field Values
-
THROWS
public static final int THROWS- See Also:
- Constant Field Values
-
TRANSIENT
public static final int TRANSIENT- See Also:
- Constant Field Values
-
TRY
public static final int TRY- See Also:
- Constant Field Values
-
VOID
public static final int VOID- See Also:
- Constant Field Values
-
VOLATILE
public static final int VOLATILE- See Also:
- Constant Field Values
-
WHILE
public static final int WHILE- See Also:
- Constant Field Values
-
IntegerLiteral
public static final int IntegerLiteral- See Also:
- Constant Field Values
-
FloatingPointLiteral
public static final int FloatingPointLiteral- See Also:
- Constant Field Values
-
BooleanLiteral
public static final int BooleanLiteral- See Also:
- Constant Field Values
-
NullLiteral
public static final int NullLiteral- See Also:
- Constant Field Values
-
RANGE_INCLUSIVE
public static final int RANGE_INCLUSIVE- See Also:
- Constant Field Values
-
RANGE_EXCLUSIVE
public static final int RANGE_EXCLUSIVE- See Also:
- Constant Field Values
-
SPREAD_DOT
public static final int SPREAD_DOT- See Also:
- Constant Field Values
-
SAFE_DOT
public static final int SAFE_DOT- See Also:
- Constant Field Values
-
SAFE_CHAIN_DOT
public static final int SAFE_CHAIN_DOT- See Also:
- Constant Field Values
-
ELVIS
public static final int ELVIS- See Also:
- Constant Field Values
-
METHOD_POINTER
public static final int METHOD_POINTER- See Also:
- Constant Field Values
-
METHOD_REFERENCE
public static final int METHOD_REFERENCE- See Also:
- Constant Field Values
-
REGEX_FIND
public static final int REGEX_FIND- See Also:
- Constant Field Values
-
REGEX_MATCH
public static final int REGEX_MATCH- See Also:
- Constant Field Values
-
POWER
public static final int POWER- See Also:
- Constant Field Values
-
POWER_ASSIGN
public static final int POWER_ASSIGN- See Also:
- Constant Field Values
-
SPACESHIP
public static final int SPACESHIP- See Also:
- Constant Field Values
-
IDENTICAL
public static final int IDENTICAL- See Also:
- Constant Field Values
-
NOT_IDENTICAL
public static final int NOT_IDENTICAL- See Also:
- Constant Field Values
-
ARROW
public static final int ARROW- See Also:
- Constant Field Values
-
NOT_INSTANCEOF
public static final int NOT_INSTANCEOF- See Also:
- Constant Field Values
-
NOT_IN
public static final int NOT_IN- See Also:
- Constant Field Values
-
LPAREN
public static final int LPAREN- See Also:
- Constant Field Values
-
RPAREN
public static final int RPAREN- See Also:
- Constant Field Values
-
LBRACE
public static final int LBRACE- See Also:
- Constant Field Values
-
RBRACE
public static final int RBRACE- See Also:
- Constant Field Values
-
LBRACK
public static final int LBRACK- See Also:
- Constant Field Values
-
RBRACK
public static final int RBRACK- See Also:
- Constant Field Values
-
SEMI
public static final int SEMI- See Also:
- Constant Field Values
-
COMMA
public static final int COMMA- See Also:
- Constant Field Values
-
DOT
public static final int DOT- See Also:
- Constant Field Values
-
ASSIGN
public static final int ASSIGN- See Also:
- Constant Field Values
-
GT
public static final int GT- See Also:
- Constant Field Values
-
LT
public static final int LT- See Also:
- Constant Field Values
-
NOT
public static final int NOT- See Also:
- Constant Field Values
-
BITNOT
public static final int BITNOT- See Also:
- Constant Field Values
-
QUESTION
public static final int QUESTION- See Also:
- Constant Field Values
-
COLON
public static final int COLON- See Also:
- Constant Field Values
-
EQUAL
public static final int EQUAL- See Also:
- Constant Field Values
-
LE
public static final int LE- See Also:
- Constant Field Values
-
GE
public static final int GE- See Also:
- Constant Field Values
-
NOTEQUAL
public static final int NOTEQUAL- See Also:
- Constant Field Values
-
AND
public static final int AND- See Also:
- Constant Field Values
-
OR
public static final int OR- See Also:
- Constant Field Values
-
INC
public static final int INC- See Also:
- Constant Field Values
-
DEC
public static final int DEC- See Also:
- Constant Field Values
-
ADD
public static final int ADD- See Also:
- Constant Field Values
-
SUB
public static final int SUB- See Also:
- Constant Field Values
-
MUL
public static final int MUL- See Also:
- Constant Field Values
-
DIV
public static final int DIV- See Also:
- Constant Field Values
-
BITAND
public static final int BITAND- See Also:
- Constant Field Values
-
BITOR
public static final int BITOR- See Also:
- Constant Field Values
-
XOR
public static final int XOR- See Also:
- Constant Field Values
-
MOD
public static final int MOD- See Also:
- Constant Field Values
-
ADD_ASSIGN
public static final int ADD_ASSIGN- See Also:
- Constant Field Values
-
SUB_ASSIGN
public static final int SUB_ASSIGN- See Also:
- Constant Field Values
-
MUL_ASSIGN
public static final int MUL_ASSIGN- See Also:
- Constant Field Values
-
DIV_ASSIGN
public static final int DIV_ASSIGN- See Also:
- Constant Field Values
-
AND_ASSIGN
public static final int AND_ASSIGN- See Also:
- Constant Field Values
-
OR_ASSIGN
public static final int OR_ASSIGN- See Also:
- Constant Field Values
-
XOR_ASSIGN
public static final int XOR_ASSIGN- See Also:
- Constant Field Values
-
MOD_ASSIGN
public static final int MOD_ASSIGN- See Also:
- Constant Field Values
-
LSHIFT_ASSIGN
public static final int LSHIFT_ASSIGN- See Also:
- Constant Field Values
-
RSHIFT_ASSIGN
public static final int RSHIFT_ASSIGN- See Also:
- Constant Field Values
-
URSHIFT_ASSIGN
public static final int URSHIFT_ASSIGN- See Also:
- Constant Field Values
-
ELVIS_ASSIGN
public static final int ELVIS_ASSIGN- See Also:
- Constant Field Values
-
CapitalizedIdentifier
public static final int CapitalizedIdentifier- See Also:
- Constant Field Values
-
Identifier
public static final int Identifier- See Also:
- Constant Field Values
-
AT
public static final int AT- See Also:
- Constant Field Values
-
ELLIPSIS
public static final int ELLIPSIS- See Also:
- Constant Field Values
-
WS
public static final int WS- See Also:
- Constant Field Values
-
NL
public static final int NL- See Also:
- Constant Field Values
-
SH_COMMENT
public static final int SH_COMMENT- See Also:
- Constant Field Values
-
UNEXPECTED_CHAR
public static final int UNEXPECTED_CHAR- See Also:
- Constant Field Values
-
DQ_GSTRING_MODE
public static final int DQ_GSTRING_MODE- See Also:
- Constant Field Values
-
TDQ_GSTRING_MODE
public static final int TDQ_GSTRING_MODE- See Also:
- Constant Field Values
-
SLASHY_GSTRING_MODE
public static final int SLASHY_GSTRING_MODE- See Also:
- Constant Field Values
-
DOLLAR_SLASHY_GSTRING_MODE
public static final int DOLLAR_SLASHY_GSTRING_MODE- See Also:
- Constant Field Values
-
GSTRING_TYPE_SELECTOR_MODE
public static final int GSTRING_TYPE_SELECTOR_MODE- See Also:
- Constant Field Values
-
GSTRING_PATH_MODE
public static final int GSTRING_PATH_MODE- See Also:
- Constant Field Values
-
channelNames
public static java.lang.String[] channelNames -
modeNames
public static java.lang.String[] modeNames -
ruleNames
public static final java.lang.String[] ruleNames -
VOCABULARY
public static final org.antlr.v4.runtime.Vocabulary VOCABULARY -
tokenNames
@Deprecated public static final java.lang.String[] tokenNamesDeprecated.UseVOCABULARY
instead. -
_serializedATN
public static final java.lang.String _serializedATN- See Also:
- Constant Field Values
-
_ATN
public static final org.antlr.v4.runtime.atn.ATN _ATN
-
-
Constructor Details
-
GroovyLexer
public GroovyLexer(org.antlr.v4.runtime.CharStream input)
-
-
Method Details
-
getTokenNames
@Deprecated public java.lang.String[] getTokenNames()Deprecated.- Overrides:
getTokenNames
in classorg.antlr.v4.runtime.Lexer
-
getVocabulary
@NotNull public org.antlr.v4.runtime.Vocabulary getVocabulary()- Overrides:
getVocabulary
in classorg.antlr.v4.runtime.Recognizer<java.lang.Integer,org.antlr.v4.runtime.atn.LexerATNSimulator>
-
emit
public void emit(org.antlr.v4.runtime.Token token)Record the index and token type of the current token while emitting tokens.- Overrides:
emit
in classorg.antlr.v4.runtime.Lexer
-
rollbackOneChar
protected void rollbackOneChar()just a hook, which will be overrided by GroovyLangLexer -
enterParenCallback
protected void enterParenCallback(java.lang.String text) -
exitParenCallback
protected void exitParenCallback(java.lang.String text) -
getSyntaxErrorSource
public int getSyntaxErrorSource() -
getErrorLine
public int getErrorLine() -
getErrorColumn
public int getErrorColumn() -
popMode
public int popMode()- Overrides:
popMode
in classorg.antlr.v4.runtime.Lexer
-
isErrorIgnored
public boolean isErrorIgnored() -
setErrorIgnored
public void setErrorIgnored(boolean errorIgnored) -
getGrammarFileName
public java.lang.String getGrammarFileName()- Specified by:
getGrammarFileName
in classorg.antlr.v4.runtime.Recognizer<java.lang.Integer,org.antlr.v4.runtime.atn.LexerATNSimulator>
-
getRuleNames
public java.lang.String[] getRuleNames()- Specified by:
getRuleNames
in classorg.antlr.v4.runtime.Recognizer<java.lang.Integer,org.antlr.v4.runtime.atn.LexerATNSimulator>
-
getSerializedATN
public java.lang.String getSerializedATN()- Overrides:
getSerializedATN
in classorg.antlr.v4.runtime.Recognizer<java.lang.Integer,org.antlr.v4.runtime.atn.LexerATNSimulator>
-
getChannelNames
@NotNull public java.lang.String[] getChannelNames()- Overrides:
getChannelNames
in classorg.antlr.v4.runtime.Lexer
-
getModeNames
@NotNull public java.lang.String[] getModeNames()- Overrides:
getModeNames
in classorg.antlr.v4.runtime.Lexer
-
action
public void action(org.antlr.v4.runtime.RuleContext _localctx, int ruleIndex, int actionIndex)- Overrides:
action
in classorg.antlr.v4.runtime.Recognizer<java.lang.Integer,org.antlr.v4.runtime.atn.LexerATNSimulator>
-
sempred
public boolean sempred(org.antlr.v4.runtime.RuleContext _localctx, int ruleIndex, int predIndex)- Overrides:
sempred
in classorg.antlr.v4.runtime.Recognizer<java.lang.Integer,org.antlr.v4.runtime.atn.LexerATNSimulator>
-
VOCABULARY
instead.