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
-
Field Summary
FieldsFields 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 TypeMethodDescription(package private) static intdecimalFromHex(char c) voiddisplayRecognitionError(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.(package private) static byte[](package private) static byte[]getBytesFromHexString(String value) (package private) static byte[]getBytesFromStringLiteral(String literal) (package private) static String(package private) static StringgetStringFromStringLiteral(String literal) (package private) static voidstatic voidload(InputStream in, Proto proto) (package private) static voidMethods 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
-
Field Details
-
SUPPRESS_WARNINGS
static final boolean SUPPRESS_WARNINGS
-
-
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
-
getStringFromStringLiteral
-
getString
-
getBytesFromStringLiteral
-
getBytes
-
getBytesFromHexString
-
decimalFromHex
static int decimalFromHex(char c) -
info
-
warn
-