public abstract class SemanticContext extends Object
Modifier and Type | Class and Description |
---|---|
static class |
SemanticContext.AND |
static class |
SemanticContext.CommutativePredicate |
static class |
SemanticContext.FalsePredicate |
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) |
static SemanticContext[] |
factorAnd(SemanticContext a,
SemanticContext b) |
static SemanticContext[] |
factorOr(SemanticContext a,
SemanticContext b) |
abstract org.stringtemplate.v4.ST |
genExpr(CodeGenerator generator,
org.stringtemplate.v4.STGroup templates,
DFA dfa)
Generate an expression that will evaluate the semantic context,
given a set of output templates.
|
static Collection<SemanticContext> |
getAndOperands(SemanticContext context) |
abstract SemanticContext |
getGatedPredicateContext()
Given a semantic context expression tree, return a tree with all
nongated predicates set to true and then reduced.
|
static Collection<SemanticContext> |
getOrOperands(SemanticContext context) |
abstract boolean |
hasUserSemanticPredicate() |
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.stringtemplate.v4.ST genExpr(CodeGenerator generator, org.stringtemplate.v4.STGroup templates, DFA dfa)
public abstract boolean hasUserSemanticPredicate()
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)
public static SemanticContext[] factorAnd(SemanticContext a, SemanticContext b)
public static SemanticContext[] factorOr(SemanticContext a, SemanticContext b)
public static Collection<SemanticContext> getAndOperands(SemanticContext context)
public static Collection<SemanticContext> getOrOperands(SemanticContext context)
Copyright © 1992–2015 ANTLR. All rights reserved.