forked from jasder/antlr
Merge branch 'tool-cleanup' of git://github.com/sharwell/antlr4
This commit is contained in:
commit
cdb357b37f
|
@ -74,6 +74,7 @@ import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.concurrent.CopyOnWriteArrayList;
|
||||||
|
|
||||||
public class Tool {
|
public class Tool {
|
||||||
public String VERSION = "4.0-"+new Date();
|
public String VERSION = "4.0-"+new Date();
|
||||||
|
@ -166,8 +167,7 @@ public class Tool {
|
||||||
public ErrorManager errMgr = new ErrorManager(this);
|
public ErrorManager errMgr = new ErrorManager(this);
|
||||||
public LogManager logMgr = new LogManager();
|
public LogManager logMgr = new LogManager();
|
||||||
|
|
||||||
List<ANTLRToolListener> listeners =
|
List<ANTLRToolListener> listeners = new CopyOnWriteArrayList<ANTLRToolListener>();
|
||||||
Collections.synchronizedList(new ArrayList<ANTLRToolListener>());
|
|
||||||
|
|
||||||
/** Track separately so if someone adds a listener, it's the only one
|
/** Track separately so if someone adds a listener, it's the only one
|
||||||
* instead of it and the default stderr listener.
|
* instead of it and the default stderr listener.
|
||||||
|
|
|
@ -185,16 +185,18 @@ public enum ErrorType {
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
public String msg;
|
public final String msg;
|
||||||
public int code; // unique, deterministic unchanging error code once we release
|
public final int code; // unique, deterministic unchanging error code once we release
|
||||||
public ErrorSeverity severity;
|
public final ErrorSeverity severity;
|
||||||
public Boolean abortsAnalysis;
|
public final Boolean abortsAnalysis;
|
||||||
public Boolean abortsCodegen;
|
public final Boolean abortsCodegen;
|
||||||
|
|
||||||
ErrorType(int code, String msg, ErrorSeverity severity) {
|
ErrorType(int code, String msg, ErrorSeverity severity) {
|
||||||
this.code = code;
|
this.code = code;
|
||||||
this.msg = msg;
|
this.msg = msg;
|
||||||
this.severity = severity;
|
this.severity = severity;
|
||||||
|
this.abortsAnalysis = false;
|
||||||
|
this.abortsCodegen = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ErrorType(String msg, ErrorSeverity severity, boolean abortsAnalysis) {
|
// ErrorType(String msg, ErrorSeverity severity, boolean abortsAnalysis) {
|
||||||
|
|
Loading…
Reference in New Issue