diff --git a/tool/src/org/antlr/v4/automata/ATNSerializer.java b/tool/src/org/antlr/v4/automata/ATNSerializer.java index ea9e547d8..f847fe244 100644 --- a/tool/src/org/antlr/v4/automata/ATNSerializer.java +++ b/tool/src/org/antlr/v4/automata/ATNSerializer.java @@ -353,7 +353,6 @@ public class ATNSerializer { throw new UnsupportedOperationException(new InvalidClassException(ATN.class.getName(), reason)); } - int grammarType = ATNSimulator.toInt(data[p++]); int maxType = ATNSimulator.toInt(data[p++]); buf.append("max type ").append(maxType).append("\n"); int nstates = ATNSimulator.toInt(data[p++]); diff --git a/tool/src/org/antlr/v4/codegen/CodeGenerator.java b/tool/src/org/antlr/v4/codegen/CodeGenerator.java index 155052772..2d2ae3b42 100644 --- a/tool/src/org/antlr/v4/codegen/CodeGenerator.java +++ b/tool/src/org/antlr/v4/codegen/CodeGenerator.java @@ -37,14 +37,9 @@ import org.antlr.v4.runtime.misc.NotNull; import org.antlr.v4.tool.ErrorType; import org.antlr.v4.tool.Grammar; import org.stringtemplate.v4.AutoIndentWriter; -import org.stringtemplate.v4.NumberRenderer; import org.stringtemplate.v4.ST; -import org.stringtemplate.v4.STErrorListener; import org.stringtemplate.v4.STGroup; -import org.stringtemplate.v4.STGroupFile; import org.stringtemplate.v4.STWriter; -import org.stringtemplate.v4.StringRenderer; -import org.stringtemplate.v4.misc.STMessage; import java.io.IOException; import java.io.Writer; @@ -226,13 +221,13 @@ public class CodeGenerator { public void write(ST code, String fileName) { try { - long start = System.currentTimeMillis(); +// long start = System.currentTimeMillis(); Writer w = tool.getOutputFileWriter(g, fileName); STWriter wr = new AutoIndentWriter(w); wr.setLineWidth(lineWidth); code.write(wr); w.close(); - long stop = System.currentTimeMillis(); +// long stop = System.currentTimeMillis(); } catch (IOException ioe) { tool.errMgr.toolError(ErrorType.CANNOT_WRITE_FILE,