version to method.
This commit is contained in:
parent
3638073efe
commit
0bb154957a
|
@ -80,7 +80,7 @@ import java.util.Map;
|
|||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
public class Tool {
|
||||
public final String VERSION = "4.0b1";
|
||||
public static final String getVersion() { return "4.0b1"; }
|
||||
|
||||
public static final String GRAMMAR_EXTENSION = ".g4";
|
||||
public static final String LEGACY_GRAMMAR_EXTENSION = ".g";
|
||||
|
@ -693,7 +693,7 @@ public class Tool {
|
|||
}
|
||||
|
||||
public void help() {
|
||||
info("ANTLR Parser Generator Version " + new Tool().VERSION);
|
||||
info("ANTLR Parser Generator Version " + Tool.getVersion());
|
||||
for (Option o : optionDefs) {
|
||||
String name = o.name + (o.argType!=OptionArgType.NONE? " ___" : "");
|
||||
String s = String.format(" %-19s %s", name, o.description);
|
||||
|
@ -736,7 +736,7 @@ public class Tool {
|
|||
}
|
||||
|
||||
public void version() {
|
||||
info("ANTLR Parser Generator Version " + new Tool().VERSION);
|
||||
info("ANTLR Parser Generator Version " + getVersion());
|
||||
}
|
||||
|
||||
public void exit(int e) { System.exit(e); }
|
||||
|
|
|
@ -63,7 +63,7 @@ public enum ErrorType {
|
|||
|
||||
// Code generation errors
|
||||
MISSING_CODE_GEN_TEMPLATES(30, "can't find code generation templates: <arg>", ErrorSeverity.ERROR),
|
||||
CANNOT_CREATE_TARGET_GENERATOR(31, "ANTLR cannot generate <arg> code as of version "+ Tool.VERSION, ErrorSeverity.ERROR),
|
||||
CANNOT_CREATE_TARGET_GENERATOR(31, "ANTLR cannot generate <arg> code as of version "+ Tool.getVersion(), ErrorSeverity.ERROR),
|
||||
CODE_TEMPLATE_ARG_ISSUE(32, "code generation template <arg> has missing, misnamed, or incomplete arg list; missing <arg2>", ErrorSeverity.ERROR),
|
||||
CODE_GEN_TEMPLATES_INCOMPLETE(33, "missing code generation template <arg>", ErrorSeverity.ERROR),
|
||||
NO_MODEL_TO_TEMPLATE_MAPPING(34, "no mapping to template name for output model class <arg>", ErrorSeverity.ERROR),
|
||||
|
|
Loading…
Reference in New Issue