org.antlr.analysis
Class SemanticContext.AND

java.lang.Object
  extended by org.antlr.analysis.SemanticContext
      extended by 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
protected  SemanticContext left
           
protected  SemanticContext right
           
 
Fields inherited from class org.antlr.analysis.SemanticContext
EMPTY_SEMANTIC_CONTEXT
 
Constructor Summary
SemanticContext.AND(SemanticContext a, SemanticContext b)
           
 
Method Summary
 StringTemplate genExpr(CodeGenerator generator, StringTemplateGroup 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.
 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, not, or
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

left

protected SemanticContext left

right

protected SemanticContext right
Constructor Detail

SemanticContext.AND

public SemanticContext.AND(SemanticContext a,
                           SemanticContext b)
Method Detail

genExpr

public StringTemplate genExpr(CodeGenerator generator,
                              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 class SemanticContext

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 class SemanticContext

isSyntacticPredicate

public boolean isSyntacticPredicate()
Specified by:
isSyntacticPredicate in class SemanticContext

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 class SemanticContext

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object