CELParser class
Constructors
- CELParser(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
ATNwith bypass alternatives.getter/setter pairinherited - context ↔ ParserRuleContext?
-
The
ParserRuleContextobject 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
trueif 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
listenerto receive events during the parsing process.inherited -
calc(
[int _p = 0]) → CalcContext -
compileParseTreePattern(
String pattern, int patternRuleIndex, [Lexer? lexer]) → ParseTreePattern -
The preferred method of getting a tree pattern. For example, here's a
sample use:
inherited
-
conditionalAnd(
) → ConditionalAndContext -
conditionalOr(
) → ConditionalOrContext -
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
-
exitRule(
) → void -
inherited
-
expr(
) → ExprContext -
exprList(
) → ExprListContext -
fieldInitializerList(
) → FieldInitializerListContext -
getATN(
) → ATN -
Get the
ATNused 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
symbolcan 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
TraceListeneris registered as a parse listener for the parser.inherited -
listInit(
) → ListInitContext -
literal(
) → LiteralContext -
mapInitializerList(
) → MapInitializerListContext -
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
-
member(
[int _p = 0]) → MemberContext -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyErrorListeners(
String msg, [Token? offendingToken, RecognitionException< IntStream> ? e]) → void -
inherited
-
optExpr(
) → OptExprContext -
optField(
) → OptFieldContext -
precpred(
RuleContext? localctx, int precedence) → bool -
inherited
-
primary(
) → PrimaryContext -
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
-
relation(
[int _p = 0]) → RelationContext -
removeErrorListener(
ErrorListener listener) → void -
inherited
-
removeErrorListeners(
) → void -
inherited
-
removeParseListener(
ParseTreeListener? listener) → void -
Remove
listenerfrom 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 predIndex) → bool -
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
-
start(
) → StartContext -
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
-
unary(
) → UnaryContext -
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_BYTES → const int
- TOKEN_CEL_FALSE → const int
- TOKEN_CEL_TRUE → const int
- TOKEN_COLON → const int
- TOKEN_COMMA → const int
- TOKEN_COMMENT → const int
- TOKEN_DOT → const int
- TOKEN_EOF → const int
- TOKEN_EQUALS → const int
- TOKEN_EXCLAM → const int
- TOKEN_GREATER → const int
- TOKEN_GREATER_EQUALS → const int
- TOKEN_IDENTIFIER → const int
- TOKEN_IN → const int
- TOKEN_LBRACE → const int
- TOKEN_LBRACKET → const int
- TOKEN_LESS → const int
- TOKEN_LESS_EQUALS → const int
- TOKEN_LOGICAL_AND → const int
- TOKEN_LOGICAL_OR → const int
- TOKEN_LPAREN → const int
- TOKEN_MINUS → const int
- TOKEN_NOT_EQUALS → const int
- TOKEN_NUL → const int
- TOKEN_NUM_FLOAT → const int
- TOKEN_NUM_INT → const int
- TOKEN_NUM_UINT → const int
- TOKEN_PERCENT → const int
- TOKEN_PLUS → const int
- TOKEN_QUESTIONMARK → const int
- TOKEN_RBRACE → const int
- TOKEN_RPAREN → const int
- TOKEN_RPRACKET → const int
- TOKEN_SLASH → const int
- TOKEN_STAR → const int
- TOKEN_STRING → const int
- TOKEN_WHITESPACE → const int