Package org.apache.lucene.expressions.js
Class JavascriptErrorHandlingLexer
java.lang.Object
org.antlr.v4.runtime.Recognizer<Integer,org.antlr.v4.runtime.atn.LexerATNSimulator>
org.antlr.v4.runtime.Lexer
org.apache.lucene.expressions.js.JavascriptLexer
org.apache.lucene.expressions.js.JavascriptErrorHandlingLexer
- All Implemented Interfaces:
org.antlr.v4.runtime.TokenSource
Overrides the ANTLR 4 generated JavascriptLexer to allow for proper error handling
-
Field Summary
Fields inherited from class org.apache.lucene.expressions.js.JavascriptLexer
_ATN, _decisionToDFA, _serializedATN, _sharedContextCache, ADD, BOOLAND, BOOLNOT, BOOLOR, BWAND, BWNOT, BWOR, BWXOR, channelNames, COLON, COMMA, COND, DECIMAL, DIV, EQ, GT, GTE, HEX, LP, LSH, LT, LTE, modeNames, MUL, NE, OCTAL, REM, RP, RSH, ruleNames, SUB, tokenNames, USH, VARIABLE, VOCABULARY, WSFields 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, SKIPFields inherited from class org.antlr.v4.runtime.Recognizer
_interp, EOF -
Constructor Summary
ConstructorsConstructorDescriptionJavascriptErrorHandlingLexer(org.antlr.v4.runtime.CharStream charStream) Constructor for JavascriptErrorHandlingLexer -
Method Summary
Modifier and TypeMethodDescriptionvoidrecover(org.antlr.v4.runtime.LexerNoViableAltException lnvae) Ensures the ANTLR lexer will throw an exception after the first errorMethods inherited from class org.apache.lucene.expressions.js.JavascriptLexer
getATN, getChannelNames, getGrammarFileName, getModeNames, getRuleNames, getSerializedATN, getTokenNames, getVocabularyMethods inherited from class org.antlr.v4.runtime.Lexer
emit, emit, emitEOF, getAllTokens, getChannel, getCharErrorDisplay, getCharIndex, getCharPositionInLine, getErrorDisplay, getErrorDisplay, getInputStream, getLine, getSourceName, getText, getToken, getTokenFactory, getType, mode, more, nextToken, notifyListeners, popMode, pushMode, recover, reset, setChannel, setCharPositionInLine, setInputStream, setLine, setText, setToken, setTokenFactory, setType, skipMethods inherited from class org.antlr.v4.runtime.Recognizer
action, addErrorListener, getErrorHeader, getErrorListenerDispatch, getErrorListeners, getInterpreter, getParseInfo, getRuleIndexMap, getState, getTokenErrorDisplay, getTokenType, getTokenTypeMap, precpred, removeErrorListener, removeErrorListeners, sempred, setInterpreter, setState
-
Constructor Details
-
JavascriptErrorHandlingLexer
public JavascriptErrorHandlingLexer(org.antlr.v4.runtime.CharStream charStream) Constructor for JavascriptErrorHandlingLexer- Parameters:
charStream- the stream for the source text
-
-
Method Details
-
recover
public void recover(org.antlr.v4.runtime.LexerNoViableAltException lnvae) Ensures the ANTLR lexer will throw an exception after the first error- Overrides:
recoverin classorg.antlr.v4.runtime.Lexer- Parameters:
lnvae- the lexer exception
-