Commit 7e93f6af authored by Emmanuel Bourg's avatar Emmanuel Bourg
Browse files

Fixed the compatibility with the version of ANTLR in Debian

parent 333d6547
Loading
Loading
Loading
Loading
+33 −0
Original line number Diff line number Diff line
Descrition: Fixes the compatibility with the version of ANTLR in Debian
Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: not-needed
--- a/src/beast/util/TreeParser.java
+++ b/src/beast/util/TreeParser.java
@@ -349,8 +349,6 @@
      * @return root node of tree
      */
     public Node parseNewick(String newick) {
-        CharStream charStream = CharStreams.fromString(newick);
-
         // Custom parse/lexer error listener
         BaseErrorListener errorListener = new BaseErrorListener() {
             @Override
@@ -364,7 +362,7 @@
 
         // Use lexer to produce token stream
 
-        NewickLexer lexer = new NewickLexer(charStream);
+        NewickLexer lexer = new NewickLexer(new org.antlr.v4.runtime.ANTLRInputStream(newick));
         lexer.removeErrorListeners();
         lexer.addErrorListener(errorListener);
 
--- a/src/beast/util/treeparser/NewickLexer.java
+++ b/src/beast/util/treeparser/NewickLexer.java
@@ -95,7 +95,6 @@
 	@Override
 	public String getSerializedATN() { return _serializedATN; }
 
-	@Override
 	public String[] getChannelNames() { return channelNames; }
 
 	@Override
+1 −0
Original line number Diff line number Diff line
@@ -2,3 +2,4 @@ fix_classpath_in_build_xml.patch
remove_appbundler.patch
# reverted_to_antlr_4.5_deacdc96.patch
# revert_NewickLexer.java_to_antlr_4.5.patch
antlr-compatibility.patch