Package org.antlr.analysis
Class SemanticContext.CommutativePredicate
java.lang.Object
org.antlr.analysis.SemanticContext
org.antlr.analysis.SemanticContext.CommutativePredicate
- Direct Known Subclasses:
SemanticContext.AND
,SemanticContext.OR
- Enclosing class:
- SemanticContext
-
Nested Class Summary
Nested classes/interfaces inherited from class org.antlr.analysis.SemanticContext
SemanticContext.AND, SemanticContext.CommutativePredicate, SemanticContext.FalsePredicate, SemanticContext.NOT, SemanticContext.OR, SemanticContext.Predicate, SemanticContext.TruePredicate
-
Field Summary
FieldsFields inherited from class org.antlr.analysis.SemanticContext
EMPTY_SEMANTIC_CONTEXT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract int
abstract SemanticContext
combinePredicates
(SemanticContext left, SemanticContext right) boolean
Given a semantic context expression tree, return a tree with all nongated predicates set to true and then reduced.abstract String
int
hashCode()
boolean
boolean
toString()
void
Notify the indicated grammar of any syn preds used within this contextMethods inherited from class org.antlr.analysis.SemanticContext
and, factorAnd, factorOr, genExpr, getAndOperands, getOrOperands, not, or
-
Field Details
-
operands
-
hashcode
protected int hashcode
-
-
Constructor Details
-
CommutativePredicate
-
CommutativePredicate
-
-
Method Details
-
getGatedPredicateContext
Description copied from class:SemanticContext
Given a semantic context expression tree, return a tree with all nongated predicates set to true and then reduced. So p&&(q||r) would return p&&r if q is nongated but p and r are gated.- Specified by:
getGatedPredicateContext
in classSemanticContext
-
hasUserSemanticPredicate
public boolean hasUserSemanticPredicate()- Specified by:
hasUserSemanticPredicate
in classSemanticContext
-
isSyntacticPredicate
public boolean isSyntacticPredicate()- Specified by:
isSyntacticPredicate
in classSemanticContext
-
trackUseOfSyntacticPredicates
Description copied from class:SemanticContext
Notify the indicated grammar of any syn preds used within this context- Overrides:
trackUseOfSyntacticPredicates
in classSemanticContext
-
equals
-
hashCode
public int hashCode() -
toString
-
getOperandString
-
combinePredicates
-
calculateHashCode
public abstract int calculateHashCode()
-