| Modifier and Type | Field and Description |
|---|---|
| public int | alt
What alt is predicted by this configuration |
| public NFAContext | context
What is the stack of rule invocations that got us to state? |
| protected int | numberEpsilonTransitionsEmanatingFromState
Lots of NFA states have only epsilon edges (1 or 2). |
| protected boolean | resolved
Indicate that this configuration has been resolved and no further DFA processing should occur with it. |
| protected boolean | resolveWithPredicate
This bit is used to indicate a semantic predicate will be used to resolve the conflict. |
| public SemanticContext | semanticContext
The set of semantic predicates associated with this NFA configuration. |
| protected boolean | singleAtomTransitionEmanating
Indicates that the NFA state associated with this configuration has exactly one transition and it's an atom (not epsilon etc...). |
| public int | state
The NFA state associated with this configuration |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. |
| public int | |
| public String | |
| public String |
| alt | back to summary |
|---|---|
| public int alt What alt is predicted by this configuration | |
| context | back to summary |
|---|---|
| public NFAContext context What is the stack of rule invocations that got us to state? | |
| numberEpsilonTransitionsEmanatingFromState | back to summary |
|---|---|
| protected int numberEpsilonTransitionsEmanatingFromState Lots of NFA states have only epsilon edges (1 or 2). We can safely consider only n>0 during closure. | |
| resolved | back to summary |
|---|---|
| protected boolean resolved Indicate that this configuration has been resolved and no further DFA processing should occur with it. Essentially, this is used as an "ignore" bit so that upon a set of nondeterministic configurations such as (s|2) and (s|3), I can set (s|3) to resolved=true (and any other configuration associated with alt 3). | |
| resolveWithPredicate | back to summary |
|---|---|
| protected boolean resolveWithPredicate This bit is used to indicate a semantic predicate will be used to resolve the conflict. Method DFA.findNewDFAStatesAndAddDFATransitions will add edges for the predicates after it performs the reach operation. The nondeterminism resolver sets this when it finds a set of nondeterministic configurations (as it does for "resolved" field) that have enough predicates to resolve the conflit. | |
| semanticContext | back to summary |
|---|---|
| public SemanticContext semanticContext The set of semantic predicates associated with this NFA configuration. The predicates were found on the way to the associated NFA state in this syntactic context. Set<AST>: track nodes in grammar containing the predicate for error messages and such (nice to know where the predicate came from in case of duplicates etc...). By using a set, the equals() method will correctly show {pred1,pred2} as equals() to {pred2,pred1}. | |
| singleAtomTransitionEmanating | back to summary |
|---|---|
| protected boolean singleAtomTransitionEmanating Indicates that the NFA state associated with this configuration has exactly one transition and it's an atom (not epsilon etc...). | |
| state | back to summary |
|---|---|
| public int state The NFA state associated with this configuration | |
| NFAConfiguration | back to summary |
|---|---|
| public NFAConfiguration(int state, int alt, NFAContext context, SemanticContext semanticContext) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. An NFA configuration is equal to another if both have the same state, the predict the same alternative, and syntactic/semantic contexts are the same. I don't think the state|alt|ctx could be the same and have two different semantic contexts, but might as well define equals to be everything.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. 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
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| toString | back to summary |
|---|---|
| public String toString(boolean showAlt) | |