public abstract class AbstractParser
extends org.antlr.runtime.Parser
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractParser(org.antlr.runtime.TokenStream input) |
protected |
AbstractParser(org.antlr.runtime.TokenStream input,
org.antlr.runtime.RecognizerSharedState state)
Create a new parser instance, pre-supplying the input token stream and the shared state.
|
| Modifier and Type | Method and Description |
|---|---|
void |
displayRecognitionError(String[] tokenNames,
org.antlr.runtime.RecognitionException e)
Creates the error/warning message that we need to show users/IDEs when ANTLR has found a parsing error, has
recovered from it and is now telling us that a parsing exception occurred.
|
static void |
load(InputStream in,
Proto proto) |
getCurrentInputSymbol, getMissingSymbol, getSourceName, getTokenStream, reset, setTokenStream, traceIn, traceOutalreadyParsedRule, beginResync, combineFollows, computeContextSensitiveRuleFOLLOW, computeErrorRecoverySet, consumeUntil, consumeUntil, emitErrorMessage, endResync, failed, getBacktrackingLevel, getErrorHeader, getErrorMessage, getGrammarFileName, getNumberOfSyntaxErrors, getRuleInvocationStack, getRuleInvocationStack, getRuleMemoization, getRuleMemoizationCacheSize, getTokenErrorDisplay, getTokenNames, match, matchAny, memoize, mismatchIsMissingToken, mismatchIsUnwantedToken, pushFollow, recover, recoverFromMismatchedSet, recoverFromMismatchedToken, reportError, setBacktrackingLevel, toStrings, traceIn, traceOutprotected AbstractParser(org.antlr.runtime.TokenStream input)
protected AbstractParser(org.antlr.runtime.TokenStream input,
org.antlr.runtime.RecognizerSharedState state)
This is only used when a grammar is imported into another grammar, but we must supply this constructor to satisfy the super class contract.
input - The stream of tokesn that will be pulled from the lexerstate - The shared state object created by an interconnectd grammarpublic void displayRecognitionError(String[] tokenNames, org.antlr.runtime.RecognitionException e)
displayRecognitionError in class org.antlr.runtime.BaseRecognizertokenNames - token names as known by ANTLR (which we ignore)e - The exception that was thrownpublic static void load(InputStream in, Proto proto) throws Exception
ExceptionCopyright © 2009–2021. All rights reserved.