Protobuf3Parser class

Constructors

Protobuf3Parser(TokenStream input)

Properties

ATNWithBypassAlts → ATN
The ATN with bypass alternatives is expensive to create so we create it lazily.
no setterinherited
buildParseTree bool
Specifies whether or not the parser should construct a parse tree during the parsing process. The default value is true.
getter/setter pairinherited
bypassAltsAtnCache ↔ ATN?
This field maps from the serialized ATN string to the deserialized ATN with bypass alternatives.
getter/setter pairinherited
context ↔ ParserRuleContext?
The ParserRuleContext object for the currently executing rule. This is always non-null during the parsing process.
getter/setter pairinherited
currentToken → Token
Match needs to return the current input symbol, which gets put into the label for the associated token ref; e.g., x=ID.
no setterinherited
dfaStrings List<String>
For debugging and other purposes.
no setterinherited
errorHandler ↔ ErrorStrategy
The error handling strategy for the parser. The default value is a new instance of DefaultErrorStrategy.
getter/setter pairinherited
errorListenerDispatch → ErrorListener
no setterinherited
errorListeners List<ErrorListener>
no setterinherited
expectedTokens → IntervalSet
Computes the set of input symbols which could follow the current parser state and context, as given by {@link #getState} and {@link #getContext}, respectively.
no setterinherited
expectedTokensWithinCurrentRule → IntervalSet
no setterinherited
grammarFileName String
For debugging and other purposes, might want the grammar name. Have ANTLR generate an implementation for this method.
no setter
hashCode int
The hash code for this object.
no setterinherited
inputStream ↔ TokenStream
covariantgetter/setter pairinherited
interpreter ↔ ParserATNSimulator?
The ATN interpreter used by the recognizer for prediction.
getter/setter pairinherited
matchedEOF bool
Indicates parser has match()ed EOF token. See {@link #exitRule()}. */
getter/setter pairinherited
numberOfSyntaxErrors int
Gets the number of syntax errors reported during parsing. This value is incremented each time {@link #notifyErrorListeners} is called.
no setterinherited
parseInfo → ParseInfo?
If profiling during the parse/lex, this will return DecisionInfo records for each decision in recognizer in a ParseInfo object.
no setterinherited
parseListeners List<ParseTreeListener>?
no setterinherited
precedence int
Get the precedence level for the top-most precedence rule.
no setterinherited
ruleContext → ParserRuleContext
no setterinherited
ruleIndexMap Map<String, int>
Get a map from rule names to rule indexes.
no setterinherited
ruleInvocationStack List<String>
no setterinherited
ruleNames List<String>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
serializedATN List<int>
If this recognizer was generated, it will have a serialized ATN representation of the grammar.
no setter
sourceName String
no setterinherited
state int
getter/setter pairinherited
tokenFactory ↔ TokenFactory<Token>
Tell our token source and error strategy about a new way to create tokens.
getter/setter pairinherited
tokenStream → TokenStream
no setterinherited
tokenTypeMap Map<String, int>
Get a map from token names to token types.
no setterinherited
trimParseTree bool
@return true if the {@link ParserRuleContext#children} list is trimmed using the default {@link Parser.TrimToSizeListener} during the parse process.
getter/setter pairinherited
vocabulary → Vocabulary
Get the vocabulary used by the recognizer.
no setter

Methods

action(RuleContext? _localctx, int ruleIndex, int actionIndex) → void
inherited
addContextToParseTree() → void
inherited
addErrorListener(ErrorListener listener) → void
inherited
addParseListener(ParseTreeListener listener) → void
Registers listener to receive events during the parsing process.
inherited
blockLit() BlockLitContext
boolLit() BoolLitContext
comment() CommentContext
compileParseTreePattern(String pattern, int patternRuleIndex, [Lexer? lexer]) → ParseTreePattern
The preferred method of getting a tree pattern. For example, here's a sample use:
inherited
constant() ConstantContext
consume() → Token
Consume and return the {@linkplain #getCurrentToken current symbol}.
inherited
createErrorNode(ParserRuleContext parent, Token t) → ErrorNode
How to create an error node, given a token, associated with a parent. Typically, the error node to create is not a function of the parent.
inherited
createTerminalNode(ParserRuleContext parent, Token t) → TerminalNode
How to create a token leaf node associated with a parent. Typically, the terminal node to create is not a function of the parent.
inherited
dumpDFA() → void
For debugging and other purposes. */
inherited
emptyStatement_() EmptyStatement_Context
enterOuterAlt(ParserRuleContext localctx, int altNum) → void
inherited
enterRecursionRule(ParserRuleContext localctx, int state, int ruleIndex, int precedence) → void
inherited
enterRule(ParserRuleContext localctx, int state, int ruleIndex) → void
Always called by generated parsers upon entry to a rule. Access field {@link #_ctx} get the current context.
inherited
enumBody() EnumBodyContext
enumDef() EnumDefContext
enumElement() EnumElementContext
enumField() EnumFieldContext
enumName() EnumNameContext
enumType() EnumTypeContext
enumValueOption() EnumValueOptionContext
enumValueOptions() EnumValueOptionsContext
exitRule() → void
inherited
field() FieldContext
fieldName() FieldNameContext
fieldNumber() FieldNumberContext
fieldOption() FieldOptionContext
fieldOptions() FieldOptionsContext
floatLit() FloatLitContext
fullIdent() FullIdentContext
getATN() → ATN
Get the ATN used by the recognizer for prediction.
getErrorHeader(RecognitionException<IntStream> e) String
What is the error header, normally line/character position information? */
inherited
getInvokingContext(int ruleIndex) → ParserRuleContext?
inherited
getRuleIndex(String ruleName) int
Get a rule's index (i.e., {@code RULE_ruleName} field) or -1 if not found. */
inherited
getRuleInvocationStack([RuleContext? p]) List<String>
Return List<String> of the rule names in your parser instance leading up to a call to the current rule. You could override if you want more details such as the file/line info of where in the ATN a rule is invoked.
inherited
getTokenType(String tokenName) int
inherited
ident() IdentContext
importStatement() ImportStatementContext
inContext(String context) bool
inherited
intLit() IntLitContext
isExpectedToken(int symbol) bool
Checks whether or not symbol can follow the current state in the ATN. The behavior of this method is equivalent to the following, but is implemented such that the complete context-sensitive follow set does not need to be explicitly constructed.
inherited
isMatchedEOF() bool
inherited
isTrace() bool
Gets whether a TraceListener is registered as a parse listener for the parser.
inherited
keyType() KeyTypeContext
keywords() KeywordsContext
mapField() MapFieldContext
mapName() MapNameContext
match(int ttype) → Token
Match current input symbol against ttype. If the symbol type matches, {@link ANTLRErrorStrategy#reportMatch} and {@link #consume} are called to complete the match process.
inherited
matchWildcard() → Token
Match current input symbol as a wildcard. If the symbol type matches (i.e. has a value greater than 0), {@link ANTLRErrorStrategy#reportMatch} and {@link #consume} are called to complete the match process.
inherited
messageBody() MessageBodyContext
messageDef() MessageDefContext
messageElement() MessageElementContext
messageName() MessageNameContext
messageType() MessageTypeContext
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyErrorListeners(String msg, [Token? offendingToken, RecognitionException<IntStream>? e]) → void
inherited
oneof() OneofContext
oneofField() OneofFieldContext
oneofName() OneofNameContext
optionName() OptionNameContext
optionStatement() OptionStatementContext
packageStatement() PackageStatementContext
precpred(RuleContext? localctx, int precedence) bool
inherited
proto() ProtoContext
pushNewRecursionContext(ParserRuleContext localctx, int state, int? ruleIndex) → void
Like {@link #enterRule} but for recursive rules. Make the current context the child of the incoming localctx.
inherited
range_() Range_Context
ranges() RangesContext
removeErrorListener(ErrorListener listener) → void
inherited
removeErrorListeners() → void
inherited
removeParseListener(ParseTreeListener? listener) → void
Remove listener from the list of parse listeners.
inherited
removeParseListeners() → void
Remove all parse listeners.
inherited
reserved() ReservedContext
reservedFieldNames() ReservedFieldNamesContext
reset([bool resetInput = true]) → void
reset the parser's state */
inherited
rpc() RpcContext
rpcName() RpcNameContext
sempred(RuleContext? _localctx, int ruleIndex, int actionIndex) bool
inherited
serviceDef() ServiceDefContext
serviceElement() ServiceElementContext
serviceName() ServiceNameContext
setProfile(bool profile) → void
@since 4.3
inherited
setTokenStream(TokenStream input) → void
Set the token stream and reset the parser. */
inherited
setTrace(bool trace) → void
During a parse is sometimes useful to listen in on the rule entry and exit events as well as token matches. This is for quick and dirty debugging.
inherited
strLit() StrLitContext
syntax() SyntaxContext
topLevelDef() TopLevelDefContext
toString() String
A string representation of this object.
inherited
triggerEnterRuleEvent() → void
Notify any parse listeners of an enter rule event.
inherited
triggerExitRuleEvent() → void
Notify any parse listeners of an exit rule event.
inherited
type_() Type_Context
unrollRecursionContexts(ParserRuleContext? _parentctx) → void
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

checkVersion → void Function()
final
VOCABULARY → Vocabulary
final

Constants

TOKEN_BOOL → const int
TOKEN_BOOL_LIT → const int
TOKEN_BYTES → const int
TOKEN_COLON → const int
TOKEN_COMMA → const int
TOKEN_DOC_LINE_COMMENT → const int
TOKEN_DOC_MULTI_COMMENT → const int
TOKEN_DOT → const int
TOKEN_DOUBLE → const int
TOKEN_ENUM → const int
TOKEN_EOF → const int
TOKEN_EQ → const int
TOKEN_FIXED32 → const int
TOKEN_FIXED64 → const int
TOKEN_FLOAT → const int
TOKEN_FLOAT_LIT → const int
TOKEN_GT → const int
TOKEN_IDENTIFIER → const int
TOKEN_IMPORT → const int
TOKEN_INT32 → const int
TOKEN_INT64 → const int
TOKEN_INT_LIT → const int
TOKEN_LB → const int
TOKEN_LC → const int
TOKEN_LINE_COMMENT → const int
TOKEN_LP → const int
TOKEN_LT → const int
TOKEN_MAP → const int
TOKEN_MAX → const int
TOKEN_MESSAGE → const int
TOKEN_MINUS → const int
TOKEN_MULTI_COMMENT → const int
TOKEN_ONEOF → const int
TOKEN_OPTION → const int
TOKEN_PACKAGE → const int
TOKEN_PLUS → const int
TOKEN_PROTO3_LIT_DOBULE → const int
TOKEN_PROTO3_LIT_SINGLE → const int
TOKEN_PUBLIC → const int
TOKEN_RB → const int
TOKEN_RC → const int
TOKEN_REPEATED → const int
TOKEN_RESERVED → const int
TOKEN_RETURNS → const int
TOKEN_RP → const int
TOKEN_RPC → const int
TOKEN_SEMI → const int
TOKEN_SERVICE → const int
TOKEN_SFIXED32 → const int
TOKEN_SFIXED64 → const int
TOKEN_SINT32 → const int
TOKEN_SINT64 → const int
TOKEN_STR_LIT → const int
TOKEN_STREAM → const int
TOKEN_STRING → const int
TOKEN_SYNTAX → const int
TOKEN_TO → const int
TOKEN_UINT32 → const int
TOKEN_UINT64 → const int
TOKEN_WEAK → const int
TOKEN_WS → const int