Package org.antlr.analysis
Class SemanticContext.AND
- java.lang.Object
-
- org.antlr.analysis.SemanticContext
-
- org.antlr.analysis.SemanticContext.CommutativePredicate
-
- org.antlr.analysis.SemanticContext.AND
-
- Enclosing class:
- SemanticContext
public static class SemanticContext.AND extends SemanticContext.CommutativePredicate
-
-
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
-
Fields inherited from class org.antlr.analysis.SemanticContext.CommutativePredicate
hashcode, operands
-
Fields inherited from class org.antlr.analysis.SemanticContext
EMPTY_SEMANTIC_CONTEXT
-
-
Constructor Summary
Constructors Constructor Description AND(java.util.HashSet<SemanticContext> contexts)
AND(SemanticContext a, SemanticContext b)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
calculateHashCode()
SemanticContext
combinePredicates(SemanticContext left, SemanticContext right)
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.java.lang.String
getOperandString()
-
Methods inherited from class org.antlr.analysis.SemanticContext.CommutativePredicate
equals, getGatedPredicateContext, hashCode, hasUserSemanticPredicate, isSyntacticPredicate, toString, trackUseOfSyntacticPredicates
-
Methods inherited from class org.antlr.analysis.SemanticContext
and, factorAnd, factorOr, getAndOperands, getOrOperands, not, or
-
-
-
-
Constructor Detail
-
AND
public AND(SemanticContext a, SemanticContext b)
-
AND
public AND(java.util.HashSet<SemanticContext> contexts)
-
-
Method Detail
-
genExpr
public org.stringtemplate.v4.ST genExpr(CodeGenerator generator, org.stringtemplate.v4.STGroup templates, DFA dfa)
Description copied from class:SemanticContext
Generate an expression that will evaluate the semantic context, given a set of output templates.- Specified by:
genExpr
in classSemanticContext
-
getOperandString
public java.lang.String getOperandString()
- Specified by:
getOperandString
in classSemanticContext.CommutativePredicate
-
combinePredicates
public SemanticContext combinePredicates(SemanticContext left, SemanticContext right)
- Specified by:
combinePredicates
in classSemanticContext.CommutativePredicate
-
calculateHashCode
public int calculateHashCode()
- Specified by:
calculateHashCode
in classSemanticContext.CommutativePredicate
-
-