public abstract class SemanticContext extends Object
Modifier and Type | Class and Description |
---|---|
static class |
SemanticContext.AND |
static class |
SemanticContext.NOT |
static class |
SemanticContext.OR |
static class |
SemanticContext.Predicate |
static class |
SemanticContext.TruePredicate |
Modifier and Type | Field and Description |
---|---|
static SemanticContext |
EMPTY_SEMANTIC_CONTEXT
Create a default value for the semantic context shared among all
NFAConfigurations that do not have an actual semantic context.
|
Constructor and Description |
---|
SemanticContext() |
Modifier and Type | Method and Description |
---|---|
static SemanticContext |
and(SemanticContext a,
SemanticContext b) |
abstract org.antlr.stringtemplate.StringTemplate |
genExpr(CodeGenerator generator,
org.antlr.stringtemplate.StringTemplateGroup templates,
DFA dfa)
Generate an expression that will evaluate the semantic context,
given a set of output templates.
|
abstract SemanticContext |
getGatedPredicateContext()
Given a semantic context expression tree, return a tree with all
nongated predicates set to true and then reduced.
|
abstract boolean |
isSyntacticPredicate() |
static SemanticContext |
not(SemanticContext a) |
static SemanticContext |
or(SemanticContext a,
SemanticContext b) |
void |
trackUseOfSyntacticPredicates(Grammar g)
Notify the indicated grammar of any syn preds used within this context
|
public static final SemanticContext EMPTY_SEMANTIC_CONTEXT
public abstract SemanticContext getGatedPredicateContext()
public abstract org.antlr.stringtemplate.StringTemplate genExpr(CodeGenerator generator, org.antlr.stringtemplate.StringTemplateGroup templates, DFA dfa)
public abstract boolean isSyntacticPredicate()
public void trackUseOfSyntacticPredicates(Grammar g)
public static SemanticContext and(SemanticContext a, SemanticContext b)
public static SemanticContext or(SemanticContext a, SemanticContext b)
public static SemanticContext not(SemanticContext a)
Copyright © 2020. All rights reserved.