Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maintain Antlr currency #1036

Closed
eclipse-modisco-bot opened this issue Nov 19, 2024 · 2 comments
Closed

Maintain Antlr currency #1036

eclipse-modisco-bot opened this issue Nov 19, 2024 · 2 comments

Comments

@eclipse-modisco-bot
Copy link

| --- | --- |
| Bugzilla Link | 553058 |
| Status | RESOLVED FIXED |
| Importance | P3 normal |
| Reported | Nov 14, 2019 09:52 EDT |
| Modified | Nov 25, 2019 08:42 EDT |
| Blocks | 552988 |
| Reporter | Ed Willink |

Description

Modisco currently uses Antlr 3.0.0 which is no longer in Orbit.

Changing to 3.2.0 reveals serious source, and probably runtime, incompatibilities.

Rebuilding with 3.2.0 seems easy and the 4 org.eclipse.modisco.jee.jsp.discoverer.tests tests that construct JSPLexer/JSPParser are still green.

Rebuilding with 4.3.0 fails, changed -fo command line, changed internal synyax, which perhaps explains why 3.2.0 is the version preferred by many projects, albeit with a patch for Xtext.

4.5 / 4.7 would seem equally problematic.

Let's go with 3.2.0.

@eclipse-modisco-bot
Copy link
Author

By Ed Willink on Nov 14, 2019 11:01

(In reply to Ed Willink from comment #0)

Rebuilding with 3.2.0 seems easy

...

Rebuilding with 4.3.0 fails

Hmm. Not so easy. Retying 3.2 indeed generates good Java bit has an NPE

error(10): internal error: Can't get property indirectDelegates using method get/isIndirectDelegates from org.antlr.tool.Grammar instance : java.lang.NullPointerException
java.util.Objects.requireNonNull(Unknown Source)
java.util.ArrayList.removeAll(Unknown Source)
org.antlr.tool.CompositeGrammar.getIndirectDelegates(CompositeGrammar.java:222)
org.antlr.tool.Grammar.getIndirectDelegates(Grammar.java:2620)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

but it generates 'good' Java files anyway. malteseduck/sonar-xquery-plugin#19 suggests using Java 7.

Attempting to regenerate with 3.0.0 or 3.0.1 hits a no Manifest problem. The following works, using 3.2 to provide the missing antlr package.

java -cp antlr-3.0.jar;antlr-3.2.jar org.antlr.Tool -fo output -lib . JSP.g

This gives similar but not quite identical files to master.

--

malteseduck/sonar-xquery-plugin#19 suggests using Java 7. No Java 7 on my laptop; use Java 5.

"C:\Program Files\Java\jdk1.5.0_22\bin\java.exe" -jar antlr-3.2.jar -fo output -lib . JSP.g

It works and is only slightly different to the Java 8 generation with NPE.

@eclipse-modisco-bot
Copy link
Author

By Ed Willink on Nov 25, 2019 08:42

Migration to 3.2.0 pushed to master for 2019-12M3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant