Class JavaScriptParserBase

  • Direct Known Subclasses:
    JavaScriptParser

    public abstract class JavaScriptParserBase
    extends org.antlr.v4.runtime.Parser
    All parser methods that used in grammar (p, prev, notLineTerminator, etc.) should start with lower case char similar to parser rules.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.antlr.v4.runtime.Parser

        org.antlr.v4.runtime.Parser.TraceListener, org.antlr.v4.runtime.Parser.TrimToSizeListener
    • Field Summary

      • Fields inherited from class org.antlr.v4.runtime.Parser

        _buildParseTrees, _ctx, _errHandler, _input, _parseListeners, _precedenceStack, _syntaxErrors, matchedEOF
      • Fields inherited from class org.antlr.v4.runtime.Recognizer

        _interp, EOF
    • Constructor Summary

      Constructors 
      Constructor Description
      JavaScriptParserBase​(org.antlr.v4.runtime.TokenStream input)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean closeBrace()  
      protected boolean lineTerminatorAhead()
      Returns true iff on the current index of the parser's token stream a token exists on the HIDDEN channel which either is a line terminator, or is a multi line comment that contains a line terminator.
      protected boolean n​(String str)
      Short form for next(String str)
      protected boolean next​(String str)
      Whether the next token value equals to @param str
      protected boolean notLineTerminator()  
      protected boolean notOpenBraceAndNotFunction()  
      protected boolean p​(String str)
      Short form for prev(String str)
      protected boolean prev​(String str)
      Whether the previous token value equals to @param str
      • Methods inherited from class org.antlr.v4.runtime.Parser

        addContextToParseTree, addParseListener, compileParseTreePattern, compileParseTreePattern, consume, createErrorNode, createTerminalNode, dumpDFA, enterOuterAlt, enterRecursionRule, enterRecursionRule, enterRule, exitRule, getATNWithBypassAlts, getBuildParseTree, getContext, getCurrentToken, getDFAStrings, getErrorHandler, getExpectedTokens, getExpectedTokensWithinCurrentRule, getInputStream, getInvokingContext, getNumberOfSyntaxErrors, getParseInfo, getParseListeners, getPrecedence, getRuleContext, getRuleIndex, getRuleInvocationStack, getRuleInvocationStack, getSourceName, getTokenFactory, getTokenStream, getTrimParseTree, inContext, isExpectedToken, isMatchedEOF, isTrace, match, matchWildcard, notifyErrorListeners, notifyErrorListeners, precpred, pushNewRecursionContext, removeParseListener, removeParseListeners, reset, setBuildParseTree, setContext, setErrorHandler, setInputStream, setProfile, setTokenFactory, setTokenStream, setTrace, setTrimParseTree, triggerEnterRuleEvent, triggerExitRuleEvent, unrollRecursionContexts
      • Methods inherited from class org.antlr.v4.runtime.Recognizer

        action, addErrorListener, getATN, getErrorHeader, getErrorListenerDispatch, getErrorListeners, getGrammarFileName, getInterpreter, getRuleIndexMap, getRuleNames, getSerializedATN, getState, getTokenErrorDisplay, getTokenNames, getTokenType, getTokenTypeMap, getVocabulary, removeErrorListener, removeErrorListeners, sempred, setInterpreter, setState
    • Constructor Detail

      • JavaScriptParserBase

        public JavaScriptParserBase​(org.antlr.v4.runtime.TokenStream input)
    • Method Detail

      • p

        protected boolean p​(String str)
        Short form for prev(String str)
      • prev

        protected boolean prev​(String str)
        Whether the previous token value equals to @param str
      • n

        protected boolean n​(String str)
        Short form for next(String str)
      • next

        protected boolean next​(String str)
        Whether the next token value equals to @param str
      • notLineTerminator

        protected boolean notLineTerminator()
      • notOpenBraceAndNotFunction

        protected boolean notOpenBraceAndNotFunction()
      • closeBrace

        protected boolean closeBrace()
      • lineTerminatorAhead

        protected boolean lineTerminatorAhead()
        Returns true iff on the current index of the parser's token stream a token exists on the HIDDEN channel which either is a line terminator, or is a multi line comment that contains a line terminator.
        Returns:
        true iff on the current index of the parser's token stream a token exists on the HIDDEN channel which either is a line terminator, or is a multi line comment that contains a line terminator.