simplify; + node always points at loopback now.

This commit is contained in:
Terence Parr 2014-07-17 18:37:57 -07:00
parent aff865d1a7
commit 73d2f1f688
1 changed files with 1 additions and 7 deletions

View File

@ -63,7 +63,6 @@ import org.antlr.v4.codegen.model.decl.TokenDecl;
import org.antlr.v4.codegen.model.decl.TokenListDecl;
import org.antlr.v4.parse.ANTLRParser;
import org.antlr.v4.runtime.atn.DecisionState;
import org.antlr.v4.runtime.atn.PlusBlockStartState;
import org.antlr.v4.runtime.atn.PlusLoopbackState;
import org.antlr.v4.runtime.atn.StarLoopEntryState;
import org.antlr.v4.runtime.misc.IntervalSet;
@ -247,12 +246,7 @@ public class ParserFactory extends DefaultOutputModelFactory {
if (!g.tool.force_atn) {
int decision;
if ( ebnfRoot.getType()==ANTLRParser.POSITIVE_CLOSURE ) {
if ( ebnfRoot.atnState instanceof PlusBlockStartState ) {
decision = ((PlusBlockStartState) ebnfRoot.atnState).loopBackState.decision;
}
else {
decision = ((PlusLoopbackState)ebnfRoot.atnState).decision;
}
decision = ((PlusLoopbackState)ebnfRoot.atnState).decision;
}
else if ( ebnfRoot.getType()==ANTLRParser.CLOSURE ) {
decision = ((StarLoopEntryState)ebnfRoot.atnState).decision;