diff --git a/tool/src/org/antlr/v4/analysis/AnalysisPipeline.java b/tool/src/org/antlr/v4/analysis/AnalysisPipeline.java index ffd720f38..46d20e67f 100644 --- a/tool/src/org/antlr/v4/analysis/AnalysisPipeline.java +++ b/tool/src/org/antlr/v4/analysis/AnalysisPipeline.java @@ -29,10 +29,10 @@ package org.antlr.v4.analysis; +import org.antlr.v4.misc.Utils; import org.antlr.v4.runtime.atn.DecisionState; import org.antlr.v4.runtime.atn.LL1Analyzer; import org.antlr.v4.runtime.misc.IntervalSet; -import org.antlr.v4.misc.Utils; import org.antlr.v4.tool.Grammar; import java.util.ArrayList; @@ -52,15 +52,13 @@ public class AnalysisPipeline { if ( lr.listOfRecursiveCycles.size()>0 ) return; // bail out // BUILD DFA FOR EACH DECISION - if ( !g.isLexer() ) processParserOrTreeParser(); + if ( !g.isLexer() ) processParser(); } - void processParserOrTreeParser() { - g.decisionLOOK = - new ArrayList(g.atn.getNumberOfDecisions()+1); + void processParser() { + g.decisionLOOK = new ArrayList(g.atn.getNumberOfDecisions()+1); for (DecisionState s : g.atn.decisionToState) { g.tool.log("LL1", "\nDECISION "+s.decision+" in rule "+g.getRule(s.ruleIndex).name); - LL1Analyzer anal = new LL1Analyzer(g.atn); IntervalSet[] look = anal.getDecisionLookahead(s); g.tool.log("LL1", "look=" + Arrays.toString(look));