Package org.antlr.analysis
Class SemanticContext.OR
java.lang.Object
org.antlr.analysis.SemanticContext
org.antlr.analysis.SemanticContext.OR
- Enclosing class:
- 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
FieldsFields inherited from class org.antlr.analysis.SemanticContext
EMPTY_SEMANTIC_CONTEXT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.antlr.stringtemplate.StringTemplate
genExpr
(CodeGenerator generator, org.antlr.stringtemplate.StringTemplateGroup templates, DFA dfa) Generate an expression that will evaluate the semantic context, given a set of output templates.Given a semantic context expression tree, return a tree with all nongated predicates set to true and then reduced.boolean
toString()
void
Notify the indicated grammar of any syn preds used within this contextMethods inherited from class org.antlr.analysis.SemanticContext
and, not, or
-
Field Details
-
operands
-
-
Constructor Details
-
OR
-
-
Method Details
-
genExpr
public org.antlr.stringtemplate.StringTemplate genExpr(CodeGenerator generator, org.antlr.stringtemplate.StringTemplateGroup 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
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
-
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
-
toString
-