Merge pull request #538 from sharwell/polish

Polish
This commit is contained in:
Sam Harwell 2014-04-06 16:29:06 -05:00
commit d9ec5c02fb
2 changed files with 13 additions and 3 deletions

View File

@ -1269,7 +1269,7 @@ public class ParserATNSimulator extends ATNSimulator {
succeeded.add(c);
}
}
return new Pair(succeeded,failed);
return new Pair<ATNConfigSet, ATNConfigSet>(succeeded,failed);
}
/** Look through a list of predicate/alt pairs, returning alts for the

View File

@ -109,8 +109,18 @@ public abstract class Transition {
public abstract int getSerializationType();
/** Are we epsilon, action, sempred? */
public boolean isEpsilon() { return false; }
/**
* Determines if the transition is an "epsilon" transition.
*
* <p>The default implementation returns {@code false}.</p>
*
* @return {@code true} if traversing this transition in the ATN does not
* consume an input symbol; otherwise, {@code false} if traversing this
* transition consumes (matches) an input symbol.
*/
public boolean isEpsilon() {
return false;
}
@Nullable
public IntervalSet label() { return null; }