Package one.gfw.antlr4.js.typescript
Class TypeScriptParserBase
- java.lang.Object
-
- org.antlr.v4.runtime.Recognizer<org.antlr.v4.runtime.Token,org.antlr.v4.runtime.atn.ParserATNSimulator>
-
- org.antlr.v4.runtime.Parser
-
- one.gfw.antlr4.js.typescript.TypeScriptParserBase
-
- Direct Known Subclasses:
TypeScriptParser
public abstract class TypeScriptParserBase extends org.antlr.v4.runtime.ParserAll parser methods that used in grammar (p, prev, notLineTerminator, etc.) should start with lower case char similar to parser rules.
-
-
Constructor Summary
Constructors Constructor Description TypeScriptParserBase(org.antlr.v4.runtime.TokenStream input)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancloseBrace()protected booleanlineTerminatorAhead()Returnstrueiff on the current index of the parser's token stream a token exists on theHIDDENchannel which either is a line terminator, or is a multi line comment that contains a line terminator.protected booleann(String str)Short form for next(String str)protected booleannext(String str)Whether the next token value equals to @param strprotected booleannotLineTerminator()protected booleannotOpenBraceAndNotFunction()protected booleanp(String str)Short form for prev(String str)protected booleanprev(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
-
-
-
-
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()
Returnstrueiff on the current index of the parser's token stream a token exists on theHIDDENchannel which either is a line terminator, or is a multi line comment that contains a line terminator.- Returns:
trueiff on the current index of the parser's token stream a token exists on theHIDDENchannel which either is a line terminator, or is a multi line comment that contains a line terminator.
-
-