| Modifier and Type | Field and Description |
|---|---|
| protected SemanticContext | semanticContext
A tree of semantic predicates from the grammar AST if label==SEMPRED. |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. o)Overrides org. |
| public SemanticContext | |
| public int | |
| public boolean | |
| public String | toString()
Overrides org. |
| public String |
| semanticContext | back to summary |
|---|---|
| protected SemanticContext semanticContext A tree of semantic predicates from the grammar AST if label==SEMPRED. In the NFA, labels will always be exactly one predicate, but the DFA may have to combine a bunch of them as it collects predicates from multiple NFA configurations into a single DFA state. | |
| PredicateLabel | back to summary |
|---|---|
| public PredicateLabel(GrammarAST predicateASTNode) Make a semantic predicate label | |
| PredicateLabel | back to summary |
|---|---|
| public PredicateLabel(SemanticContext semCtx) Make a semantic predicates label | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides org. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getSemanticContext | back to summary |
|---|---|
| public SemanticContext getSemanticContext() Overrides org.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides org. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isSemanticPredicate | back to summary |
|---|---|
| public boolean isSemanticPredicate() Overrides org.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides org. Doc from org. Predicates are lists of AST nodes from the NFA created from the grammar, but the same predicate could be cut/paste into multiple places in the grammar. I must compare the text of all the predicates to truly answer whether {p1,p2} .equals {p1,p2}. Unfortunately, I cannot rely on the AST.equals() to work properly so I must do a brute force O(n^2) nested traversal of the Set doing a String compare. At this point, Labels are not compared for equals when they are predicates, but here's the code for future use.
| |
| toString | back to summary |
|---|---|
| public String toString(Grammar g) Overrides org.
| |