SemanticContext.AND
, SemanticContext.OR
public abstract static class SemanticContext.CommutativePredicate extends SemanticContext
SemanticContext.AND, SemanticContext.CommutativePredicate, SemanticContext.FalsePredicate, SemanticContext.NOT, SemanticContext.OR, SemanticContext.Predicate, SemanticContext.TruePredicate
Modifier and Type | Field | Description |
---|---|---|
protected int |
hashcode |
|
protected Set<SemanticContext> |
operands |
EMPTY_SEMANTIC_CONTEXT
Constructor | Description |
---|---|
CommutativePredicate(HashSet<SemanticContext> contexts) |
|
CommutativePredicate(SemanticContext a,
SemanticContext b) |
Modifier and Type | Method | Description |
---|---|---|
abstract int |
calculateHashCode() |
|
abstract SemanticContext |
combinePredicates(SemanticContext left,
SemanticContext right) |
|
boolean |
equals(Object obj) |
|
SemanticContext |
getGatedPredicateContext() |
Given a semantic context expression tree, return a tree with all
nongated predicates set to true and then reduced.
|
abstract String |
getOperandString() |
|
int |
hashCode() |
|
boolean |
hasUserSemanticPredicate() |
|
boolean |
isSyntacticPredicate() |
|
String |
toString() |
|
void |
trackUseOfSyntacticPredicates(Grammar g) |
Notify the indicated grammar of any syn preds used within this context
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
and, factorAnd, factorOr, genExpr, getAndOperands, getOrOperands, not, or
protected final Set<SemanticContext> operands
protected int hashcode
public CommutativePredicate(SemanticContext a, SemanticContext b)
public CommutativePredicate(HashSet<SemanticContext> contexts)
public SemanticContext getGatedPredicateContext()
SemanticContext
getGatedPredicateContext
in class SemanticContext
public boolean hasUserSemanticPredicate()
hasUserSemanticPredicate
in class SemanticContext
public boolean isSyntacticPredicate()
isSyntacticPredicate
in class SemanticContext
public void trackUseOfSyntacticPredicates(Grammar g)
SemanticContext
trackUseOfSyntacticPredicates
in class SemanticContext
public abstract String getOperandString()
public abstract SemanticContext combinePredicates(SemanticContext left, SemanticContext right)
public abstract int calculateHashCode()
Copyright © 1992–2019 ANTLR. All rights reserved.