diff --git a/runtime/Java/src/org/antlr/v4/runtime/BaseRecognizer.java b/runtime/Java/src/org/antlr/v4/runtime/BaseRecognizer.java index de6cc647c..e2c9996f4 100644 --- a/runtime/Java/src/org/antlr/v4/runtime/BaseRecognizer.java +++ b/runtime/Java/src/org/antlr/v4/runtime/BaseRecognizer.java @@ -321,7 +321,6 @@ public abstract class BaseRecognizer { * so that it creates a new Java type. */ public String getTokenErrorDisplay(Token t) { - System.err.println("mmmm3"); String s = t.getText(); if ( s==null ) { if ( t.getType()==Token.EOF ) { diff --git a/runtime/Java/src/org/antlr/v4/runtime/misc/LABitSet.java b/runtime/Java/src/org/antlr/v4/runtime/misc/LABitSet.java index bb73c93e7..09b3faedb 100644 --- a/runtime/Java/src/org/antlr/v4/runtime/misc/LABitSet.java +++ b/runtime/Java/src/org/antlr/v4/runtime/misc/LABitSet.java @@ -3,7 +3,7 @@ package org.antlr.v4.runtime.misc; import org.antlr.runtime.Token; /** */ -public class LABitSet { +public class LABitSet implements Cloneable { public final static int BITS = 64; // number of bits / long public final static int LOG_BITS = 6; // 2^6 == 64 @@ -113,11 +113,12 @@ public class LABitSet { s.bits = new long[bits.length]; System.arraycopy(bits, 0, s.bits, 0, bits.length); s.EOF = EOF; + return s; } catch (CloneNotSupportedException e) { - throw new InternalError(); + e.printStackTrace(System.err); } - return s; + return null; } /**