conflict with inmemantlr-api

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

conflict with inmemantlr-api

Peter Cheung
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: conflict with inmemantlr-api

Enrico Scantamburlo
Try to add antlr 4.7 as a library inside the module: Properties/Libraries/Add New Library... 

Il 31/lug/2017 05:22, "Peter Cheung" <[hidden email]> ha scritto:
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: conflict with inmemantlr-api

Peter Cheung

Not working, because i am using maven.




From: Enrico Scantamburlo <[hidden email]>
Sent: Monday, July 31, 2017 10:59 PM
To: [hidden email]
Subject: [platform-dev] Re: conflict with inmemantlr-api
 
Try to add antlr 4.7 as a library inside the module: Properties/Libraries/Add New Library... 

Il 31/lug/2017 05:22, "Peter Cheung" <[hidden email]> ha scritto:
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: conflict with inmemantlr-api

arsi
Hi,

What is in your pom.xml, the 4.7 version..
I do not understand  antlr4-runtime:3.7

This would probably be better:

            <dependency>
                 <groupId>org.antlr</groupId>
                 <artifactId>antlr4</artifactId>
                 <version>4.7</version>
             </dependency>


Arsi



From: Peter Cheung
Sent: Sunday, August 13, 2017 12:05AM
To: Dev
Subject: [platform-dev] Re: conflict with inmemantlr-api


Not working, because i am using maven.




From: Enrico Scantamburlo [hidden email]
Sent: Monday, July 31, 2017 10:59 PM
To: [hidden email]
Subject: [platform-dev] Re: conflict with inmemantlr-api
 
Try to add antlr 4.7 as a library inside the module: Properties/Libraries/Add New Library... 

Il 31/lug/2017 05:22, "Peter Cheung" <[hidden email]> ha scritto:
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:

Loading...