conflict with inmemantlr-api

Peter Cheung <[email protected]> Mon, 31 Jul 2017 03:21:43 +0000
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Message-ID <HK2PR0401MB142759246949F91476B9F102B5B20@HK2PR0401MB1427.apcprd04.prod.outlook.com>
Dear All
   I want to use inmemantlr-api (https://github.com/julianthome/inmemantlr). It needs antlr 4.7 runtime so org-netbeans-libs-antlr4-runtime can’t help, because it is antlr 4.5.3. If i just add antlr4-runtime:3.7 without adding org-netbeans-libs-antlr4-runtime, i got these error:

ANTLR Tool version 4.5.3 used for code generation does not match the current runtime version 4.7org.snt.inmemantlr.exceptions.CompilationErrorException: ----------
1. ERROR in /CalculatorLexer.java (at line 2)
import org.antlr.v4.runtime.Lexer;
      ^^^^^^^^^
The import org.antlr cannot be resolved
----------
2. ERROR in /CalculatorLexer.java (at line 3)
import org.antlr.v4.runtime.CharStream;
      ^^^^^^^^^
The import org.antlr cannot be resolved
----------
3. ERROR in /CalculatorLexer.java (at line 4)
import org.antlr.v4.runtime.Token;
      ^^^^^^^^^
The import org.antlr cannot be resolved
—————

If I don’t add BOTH org-netbeans-libs-antlr4-runtime but not antlr4-runtime:3.7, i got:

org.snt.inmemantlr.exceptions.CompilationErrorException: ----------
1. ERROR in /CalculatorLexer.java (at line 2)
import org.antlr.v4.runtime.Lexer;
      ^^^^^^^^^
The import org.antlr cannot be resolved
----------
2. ERROR in /CalculatorLexer.java (at line 3)
import org.antlr.v4.runtime.CharStream;
      ^^^^^^^^^
The import org.antlr cannot be resolved
----------
3. ERROR in /CalculatorLexer.java (at line 4)
import org.antlr.v4.runtime.Token;
      ^^^^^^^^^
The import org.antlr cannot be resolved

Please help

thanks
Peter