public static class SemanticContext.Empty extends SemanticContext
SemanticContext.AND, SemanticContext.Empty, SemanticContext.Operator, SemanticContext.OR, SemanticContext.PrecedencePredicate, SemanticContext.Predicate| Modifier and Type | Field and Description |
|---|---|
static SemanticContext.Empty |
Instance
The default
SemanticContext, which is semantically equivalent to
a predicate of the form {true}?. |
| Constructor and Description |
|---|
Empty() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
eval(Recognizer<?,?> parser,
RuleContext parserCallStack)
For context independent predicates, we evaluate them without a local
context (i.e., null context).
|
and, evalPrecedence, orpublic static final SemanticContext.Empty Instance
SemanticContext, which is semantically equivalent to
a predicate of the form {true}?.public boolean eval(Recognizer<?,?> parser, RuleContext parserCallStack)
SemanticContextFor context dependent predicates, we must pass in a local context so that references such as $arg evaluate properly as _localctx.arg. We only capture context dependent predicates in the context in which we begin prediction, so we passed in the outer context here in case of context dependent predicate evaluation.
eval in class SemanticContext