diff --git a/tool/src/org/antlr/v4/Tool.java b/tool/src/org/antlr/v4/Tool.java index ead63a6bd..f02875762 100644 --- a/tool/src/org/antlr/v4/Tool.java +++ b/tool/src/org/antlr/v4/Tool.java @@ -90,7 +90,7 @@ public class Tool { public static final String VERSION; static { String version = Tool.class.getPackage().getImplementationVersion(); - VERSION = version != null ? version : "4.2"; + VERSION = version != null ? version : "4.3"; } public static final String GRAMMAR_EXTENSION = ".g4"; diff --git a/tool/src/org/antlr/v4/codegen/Target.java b/tool/src/org/antlr/v4/codegen/Target.java index 928d2626f..177639c6a 100644 --- a/tool/src/org/antlr/v4/codegen/Target.java +++ b/tool/src/org/antlr/v4/codegen/Target.java @@ -92,15 +92,15 @@ public abstract class Target { * For now, a simple string match used on x.y of x.y.z scheme. We use a method to avoid mismatches * between a template called VERSION. This value is checked against Tool.VERSION during load of templates. */ - public abstract String getVersion(); + public String getVersion() { return "4.3"; } public STGroup getTemplates() { if (templates == null) { - templates = loadTemplates(); String version = getVersion(); if (version == null || !version.equals(Tool.VERSION)) { gen.tool.errMgr.toolError(ErrorType.INCOMPATIBLE_TOOL_AND_TEMPLATES, version, Tool.VERSION, language); } + templates = loadTemplates(); } return templates;