admin管理员组文章数量:1419228
I am using Proleap Cobol Parser and at run time it is automatically taking antlr runtime 13 which is not able to deserialize the Adaptive Transition Network (java.io.InvalidClassException: .antlr.v4.runtime.atn.ATN; Could not deserialize ATN with version 3 (expected 4).)
The version of Proleap Cobol Parser is 4.7.2 that is currently available at . But when I am using the below dependency management to downgrade my antlr4-runtime version to 4.7.2, some of the methods just simply become unreachable, i.e. not supported.
<dependencyManagement>
<dependencies>
<dependency>
<groupId>.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
<version>4.7.2</version> <!-- Force the correct version -->
<scope>runtime</scope>
</dependency>
</dependencies>
</dependencyManagement>`
I just want the correct the version combo of antlr4-runtime and Proleap Cobol Parser.
I am using Proleap Cobol Parser and at run time it is automatically taking antlr runtime 13 which is not able to deserialize the Adaptive Transition Network (java.io.InvalidClassException: .antlr.v4.runtime.atn.ATN; Could not deserialize ATN with version 3 (expected 4).)
The version of Proleap Cobol Parser is 4.7.2 that is currently available at https://github/uwol/proleap-cobol-parser. But when I am using the below dependency management to downgrade my antlr4-runtime version to 4.7.2, some of the methods just simply become unreachable, i.e. not supported.
<dependencyManagement>
<dependencies>
<dependency>
<groupId>.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
<version>4.7.2</version> <!-- Force the correct version -->
<scope>runtime</scope>
</dependency>
</dependencies>
</dependencyManagement>`
I just want the correct the version combo of antlr4-runtime and Proleap Cobol Parser.
Share Improve this question edited Jan 29 at 14:32 Simon Sobisch 7,3821 gold badge20 silver badges40 bronze badges asked Jan 29 at 11:32 Ashish GuptaAshish Gupta 1 3- Either downgrade your own code, or fork the Proleap Cobol Parser and upgrade it. – Bart Kiers Commented Jan 29 at 18:04
- "I am using the below dependency management to downgrade my antlr4-runtime version to 4.7.2" What version of ANTLR is your code actually using? It seems that you are showing only a part of the problem. Does your application build requires a newer version of ANTLR? Share a full minimal reproducible example. – aled Commented Jan 31 at 12:46
- Also, what is ANTLR runtime 13? That doesn't look like a valid version for ANTLR. – aled Commented Jan 31 at 12:50
1 Answer
Reset to default 0What worked for me,
cloned the proleap repository
having java and ANTRL4 runtime jar in path
moved to path
...\src\main\antlr4\io\proleap\cobol
e.g. directory containing the two grammersin this directory executed
java .antlr.v4.Tool -package io.proleap.cobol -visitor Cobol.g4
java .antlr.v4.Tool -package io.proleap.cobol -visitor CobolPreprocessor.g4
This generates listeners and vistors and adds package needed.copied all generated files but the two grammers to
...\src\main\java\io\proleap\cobol
used Java 21 (selected in IntelliJ)
used latest ANTLR4 by setting in
pom.xml
<antlr.version>4.13.2<antlr.version>
project compiled error free
本文标签: javaWhich version of Proleap COBOL Parser is compatible with antlr4runtime version 13Stack Overflow
版权声明:本文标题:java - Which version of Proleap COBOL Parser is compatible with antlr4-runtime version 13? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745301553a2652400.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论