Merge branch 'tool-cleanup' of git://github.com/sharwell/antlr4

This commit is contained in:
Terence Parr 2012-04-04 13:06:55 -07:00
commit cdb357b37f
2 changed files with 9 additions and 7 deletions

View File

@ -74,6 +74,7 @@ import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
public class Tool {
public String VERSION = "4.0-"+new Date();
@ -166,8 +167,7 @@ public class Tool {
public ErrorManager errMgr = new ErrorManager(this);
public LogManager logMgr = new LogManager();
List<ANTLRToolListener> listeners =
Collections.synchronizedList(new ArrayList<ANTLRToolListener>());
List<ANTLRToolListener> listeners = new CopyOnWriteArrayList<ANTLRToolListener>();
/** Track separately so if someone adds a listener, it's the only one
* instead of it and the default stderr listener.

View File

@ -185,16 +185,18 @@ public enum ErrorType {
;
public String msg;
public int code; // unique, deterministic unchanging error code once we release
public ErrorSeverity severity;
public Boolean abortsAnalysis;
public Boolean abortsCodegen;
public final String msg;
public final int code; // unique, deterministic unchanging error code once we release
public final ErrorSeverity severity;
public final Boolean abortsAnalysis;
public final Boolean abortsCodegen;
ErrorType(int code, String msg, ErrorSeverity severity) {
this.code = code;
this.msg = msg;
this.severity = severity;
this.abortsAnalysis = false;
this.abortsCodegen = false;
}
// ErrorType(String msg, ErrorSeverity severity, boolean abortsAnalysis) {