add convenience method

[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9558]
This commit is contained in:
parrt 2011-12-11 11:23:42 -08:00
parent c32b703555
commit c3630843d2
1 changed files with 7 additions and 0 deletions

View File

@ -118,6 +118,13 @@ public class ATN {
return s.decision;
}
public DecisionState getDecisionState(int decision) {
if ( decisionToState.size()>0 ) {
return decisionToState.get(decision);
}
return null;
}
public int getNumberOfDecisions() {
return decisionToState.size();
}