EnvParser class

Constructors

EnvParser(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
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
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
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
env() EnvContext
exitRule() → void
inherited
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
inContext(String context) bool
inherited
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
key() KeyContext
line() LineContext
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
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyErrorListeners(String msg, [Token? offendingToken, RecognitionException<IntStream>? e]) → void
inherited
precpred(RuleContext? localctx, int precedence) bool
inherited
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
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
reset([bool resetInput = true]) → void
reset the parser's state */
inherited
sempred(RuleContext? _localctx, int ruleIndex, int actionIndex) bool
inherited
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
string() StringContext
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
unrollRecursionContexts(ParserRuleContext? _parentctx) → void
inherited
value() ValueContext

Operators

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

Static Properties

checkVersion → void Function()
final
VOCABULARY → Vocabulary
final

Constants

TOKEN_BOOLEAN → const int
TOKEN_COMMENT → const int
TOKEN_DOUBLE → const int
TOKEN_DOUBLE_QUOTE_STRING → const int
TOKEN_EOF → const int
TOKEN_INT → const int
TOKEN_KEY → const int
TOKEN_NEWLINE → const int
TOKEN_NO_QUOTE_STRING → const int
TOKEN_SINGLE_QUOTE_STRING → const int
TOKEN_T__0 → const int
TOKEN_WS → const int