Package org.antlr.analysis
Class SemanticContext.NOT
- java.lang.Object
-
- org.antlr.analysis.SemanticContext
-
- org.antlr.analysis.SemanticContext.NOT
-
- Enclosing class:
- SemanticContext
public static class SemanticContext.NOT extends 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
Fields Modifier and Type Field Description protected SemanticContext
ctx
-
Fields inherited from class org.antlr.analysis.SemanticContext
EMPTY_SEMANTIC_CONTEXT
-
-
Constructor Summary
Constructors Constructor Description NOT(SemanticContext ctx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object object)
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.SemanticContext
getGatedPredicateContext()
Given a semantic context expression tree, return a tree with all nongated predicates set to true and then reduced.int
hashCode()
boolean
hasUserSemanticPredicate()
boolean
isSyntacticPredicate()
java.lang.String
toString()
void
trackUseOfSyntacticPredicates(Grammar g)
Notify the indicated grammar of any syn preds used within this context-
Methods inherited from class org.antlr.analysis.SemanticContext
and, factorAnd, factorOr, getAndOperands, getOrOperands, not, or
-
-
-
-
Field Detail
-
ctx
protected SemanticContext ctx
-
-
Constructor Detail
-
NOT
public NOT(SemanticContext ctx)
-
-
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
-
getGatedPredicateContext
public SemanticContext 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
public void trackUseOfSyntacticPredicates(Grammar g)
Description copied from class:SemanticContext
Notify the indicated grammar of any syn preds used within this context- Overrides:
trackUseOfSyntacticPredicates
in classSemanticContext
-
equals
public boolean equals(java.lang.Object object)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-