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

class JavascriptErrorHandlingLexer extends JavascriptLexer
Overrides the ANTLR 4 generated JavascriptLexer to allow for proper error handling
  • Field Summary

    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
  • Constructor Summary

    Constructors
    Constructor
    Description
    JavascriptErrorHandlingLexer(org.antlr.v4.runtime.CharStream charStream)
    Constructor for JavascriptErrorHandlingLexer
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    recover(org.antlr.v4.runtime.LexerNoViableAltException lnvae)
    Ensures the ANTLR lexer will throw an exception after the first error

    Methods inherited from class org.apache.lucene.expressions.js.JavascriptLexer

    getATN, getGrammarFileName, getModeNames, getRuleNames, getSerializedATN, getTokenNames, getVocabulary

    Methods inherited from class org.antlr.v4.runtime.Lexer

    emit, emit, emitEOF, getAllTokens, getChannel, getChannelNames, 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, skip

    Methods 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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:
      recover in class org.antlr.v4.runtime.Lexer
      Parameters:
      lnvae - the lexer exception