Class AbstractParser
java.lang.Object
org.antlr.runtime.BaseRecognizer
org.antlr.runtime.Parser
io.protostuff.parser.AbstractParser
- Direct Known Subclasses:
ProtoParser
public abstract class AbstractParser
extends org.antlr.runtime.Parser
Base parser
- Author:
- David Yu
-
Field Summary
Fields inherited from class org.antlr.runtime.Parser
inputFields inherited from class org.antlr.runtime.BaseRecognizer
DEFAULT_TOKEN_CHANNEL, HIDDEN, INITIAL_FOLLOW_STACK_SIZE, MEMO_RULE_FAILED, MEMO_RULE_UNKNOWN, NEXT_TOKEN_RULE_NAME, state -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractParser(org.antlr.runtime.TokenStream input) protectedAbstractParser(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. -
Method Summary
Modifier and TypeMethodDescriptionvoiddisplayRecognitionError(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 voidload(InputStream in, Proto proto) Methods inherited from class org.antlr.runtime.Parser
getCurrentInputSymbol, getMissingSymbol, getSourceName, getTokenStream, reset, setTokenStream, traceIn, traceOutMethods inherited from class org.antlr.runtime.BaseRecognizer
alreadyParsedRule, 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, traceOut
-
Constructor Details
-
AbstractParser
protected AbstractParser(org.antlr.runtime.TokenStream input)
-
-
Method Details
-
displayRecognitionError
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.- Overrides:
displayRecognitionErrorin classorg.antlr.runtime.BaseRecognizer- Parameters:
tokenNames- token names as known by ANTLR (which we ignore)e- The exception that was thrown
-
load
- Throws:
Exception
-