Update the assignment of Tool.VERSION (fixes #634)

* Reference RuntimeMetaData.VERSION so there are fewer version numbers to update during a release
* Assign the value in a static initializer so it's not a compile-time constant
This commit is contained in:
Sam Harwell 2014-06-18 17:43:47 -05:00
parent 2be522f009
commit 7b88a6dbeb
1 changed files with 5 additions and 1 deletions

View File

@ -48,6 +48,7 @@ import org.antlr.v4.parse.GrammarTreeVisitor;
import org.antlr.v4.parse.ToolANTLRLexer;
import org.antlr.v4.parse.ToolANTLRParser;
import org.antlr.v4.parse.v3TreeGrammarException;
import org.antlr.v4.runtime.RuntimeMetaData;
import org.antlr.v4.runtime.misc.LogManager;
import org.antlr.v4.runtime.misc.Nullable;
import org.antlr.v4.semantics.SemanticPipeline;
@ -87,7 +88,10 @@ import java.util.Map;
import java.util.concurrent.CopyOnWriteArrayList;
public class Tool {
public static final String VERSION = "4.3";
public static final String VERSION;
static {
VERSION = RuntimeMetaData.VERSION;
}
public static final String GRAMMAR_EXTENSION = ".g4";
public static final String LEGACY_GRAMMAR_EXTENSION = ".g";