Package org.antlr.analysis
Class SemanticContext.AND
- java.lang.Object
-
- org.antlr.analysis.SemanticContext
-
- org.antlr.analysis.SemanticContext.AND
-
- Enclosing class:
- SemanticContext
public static class SemanticContext.AND extends SemanticContext
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.antlr.analysis.SemanticContext
SemanticContext.AND, SemanticContext.NOT, SemanticContext.OR, SemanticContext.Predicate, SemanticContext.TruePredicate
-
-
Field Summary
Fields Modifier and Type Field Description protected SemanticContextleftprotected SemanticContextright-
Fields inherited from class org.antlr.analysis.SemanticContext
EMPTY_SEMANTIC_CONTEXT
-
-
Constructor Summary
Constructors Constructor Description AND(SemanticContext a, SemanticContext b)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.antlr.stringtemplate.StringTemplategenExpr(CodeGenerator generator, org.antlr.stringtemplate.StringTemplateGroup templates, DFA dfa)Generate an expression that will evaluate the semantic context, given a set of output templates.SemanticContextgetGatedPredicateContext()Given a semantic context expression tree, return a tree with all nongated predicates set to true and then reduced.booleanisSyntacticPredicate()java.lang.StringtoString()voidtrackUseOfSyntacticPredicates(Grammar g)Notify the indicated grammar of any syn preds used within this context-
Methods inherited from class org.antlr.analysis.SemanticContext
and, not, or
-
-
-
-
Field Detail
-
left
protected SemanticContext left
-
right
protected SemanticContext right
-
-
Constructor Detail
-
AND
public AND(SemanticContext a, SemanticContext b)
-
-
Method Detail
-
genExpr
public org.antlr.stringtemplate.StringTemplate genExpr(CodeGenerator generator, org.antlr.stringtemplate.StringTemplateGroup templates, DFA dfa)
Description copied from class:SemanticContextGenerate an expression that will evaluate the semantic context, given a set of output templates.- Specified by:
genExprin classSemanticContext
-
getGatedPredicateContext
public SemanticContext getGatedPredicateContext()
Description copied from class:SemanticContextGiven 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:
getGatedPredicateContextin classSemanticContext
-
isSyntacticPredicate
public boolean isSyntacticPredicate()
- Specified by:
isSyntacticPredicatein classSemanticContext
-
trackUseOfSyntacticPredicates
public void trackUseOfSyntacticPredicates(Grammar g)
Description copied from class:SemanticContextNotify the indicated grammar of any syn preds used within this context- Overrides:
trackUseOfSyntacticPredicatesin classSemanticContext
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-