update comment

[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 6784]
This commit is contained in:
parrt 2010-03-31 17:13:25 -08:00
parent 856c532174
commit ddc285a6c1
1 changed files with 3 additions and 5 deletions

View File

@ -95,8 +95,8 @@ public class NFAContext {
/** Two contexts are equals() if both have /** Two contexts are equals() if both have
* same call stack; walk upwards to the root. * same call stack; walk upwards to the root.
* Recall that the root sentinel node has no invokingStates and no parent. * Recall that the root sentinel node has no parent.
* Note that you may be comparing contexts in different alt trees. * Note that you may be comparing contextsv in different alt trees.
*/ */
public boolean equals(Object o) { public boolean equals(Object o) {
NFAContext other = ((NFAContext)o); NFAContext other = ((NFAContext)o);
@ -105,9 +105,7 @@ public class NFAContext {
// System.out.println("comparing "+this+" with "+other); // System.out.println("comparing "+this+" with "+other);
NFAContext sp = this; NFAContext sp = this;
while ( sp.parent!=null && other.parent!=null ) { while ( sp.parent!=null && other.parent!=null ) {
if ( sp.returnState != other.returnState) { if ( sp.returnState != other.returnState) return false;
return false;
}
sp = sp.parent; sp = sp.parent;
other = other.parent; other = other.parent;
} }