GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [core] Fix #4972: Update ANTLR from 4.9.3 to 4.13.2 by UncleOwen · Pull Request #6621 · pmd/pmd

Conversation

@UncleOwen

@UncleOwen UncleOwen commented Apr 24, 2026 •
edited by adangel
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Describe the PR

  • Update antlr from 4.9.3 to 4.13.2 (this PR)
  • pmd-apex: Update apex-parser from 4.4.1 to 5.0.0 via chore(deps): bump io.github.apex-dev-tools:apex-parser from 4.4.1 to 5.0.0 #6612 (included here)
  • pmd-swift: Fix grammar via [swift] Fix invalid swift token OSXApplicationExtension #6654 (included here)

Questions

Is updating apex-parser a breaking change that requires a major version?
I haven't investigated why SwiftNameDictionary needs the added slash. I just know that this makes the test green. Is this a sign of a bigger problem?

-> yes. Actually these are tokens/keywords that don't exist and should be removed. But we can't due to #6655.

Related issues

  • Fix [core] Update ANTLR to 4.13.2 #4972

Ready?

  • [n/a] Added unit tests for fixed bug/feature
  • Passing all unit tests
  • Complete build ./mvnw clean verify passes (checked automatically by github actions)
  • [n/a] Added (in-code) documentation (if needed)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dependabot
chore(deps): bump io.github.apex-dev-tools:apex-parser
b6e1199
Bumps [io.github.apex-dev-tools:apex-parser](https://github.com/apex-dev-tools/apex-parser) from 4.4.1 to 5.0.0.
- [Release notes](https://github.com/apex-dev-tools/apex-parser/releases)
- [Changelog](https://github.com/apex-dev-tools/apex-parser/blob/main/CHANGELOG.md)
- [Commits](apex-dev-tools/apex-parser@v4.4.1...v5.0.0)

---
updated-dependencies:
- dependency-name: io.github.apex-dev-tools:apex-parser
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@UncleOwen UncleOwen changed the title [core][apex][swift] Fix #4972: Update antlr from 4.9.3 to 4.13.2 [chore][apex][swift] Fix #4972: Update antlr from 4.9.3 to 4.13.2 Apr 24, 2026
@pmd-actions-helper

pmd-actions-helper Bot commented Apr 24, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Documentation Preview

Compared to main:
This changeset changes 0 violations,
introduces 0 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 0 errors and 0 configuration errors.
There are 0 changed duplications, 0 new duplications and 0 removed duplications.
There are 0 changed CPD errors, 0 new CPD errors and 0 removed CPD errors.

Regression Tester Report

(comment created at 2026-05-08 10:08:20+00:00 for d4b7d81)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@UncleOwen
UncleOwen force-pushed the issue-4972-update-antlr branch from 2c8d48e to 1307e2b Compare April 24, 2026 14:09
@UncleOwen

UncleOwen commented Apr 27, 2026

Copy link
Copy Markdown
Member Author

The different unicode escaping in SwiftNameDictionary seems to be necessary because of antlr/antlr4#2281, so I think this should be fine.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@UncleOwen UncleOwen added the dependencies Pull requests that update a dependency file label May 1, 2026
adangel
adangel reviewed May 8, 2026
View reviewed changes

@adangel adangel left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Note, that upgrading antlr will be a breaking change:

https://github.com/antlr/antlr4/releases/tag/4.10

4.10-generated parsers incompatible with previous runtimes

ANTLR not only generates recursive-descent parsers; it generates a state machine called an augmented transition network (ATN) in serialized form as a bunch of integers stored in the generated parser and lexer files. This serialization format was changed for 4.10 to remove a size limit on the supported ATNs. See antlr/antlr4#3591.

The key point here is that we changed the version number stored inside the serialization format and so, in order to use this new version of ANTLR, you must regenerate all of your lexers and parsers using the 4.10 tool and then use the new runtime. Parsers generated with 4.10 or not compatible with previous versions of the runtime.

I guess, we will know, how many downstream users use PMD with antlr and not rebuilding their grammar when building their custom language module, when we release 7.25.0.

But upgrading this allows us to upgrade apex-parser to a version 5+ which hopefully fixes some grammar issues (unfortunately not part of 5.0.0 yet: apex-dev-tools/apex-parser#84 would be needed for #6478 ). So, we should definitely upgrade, then the next upgrade is easier.

I'll update this PR, update release notes, fix swift grammar (remove the hyphen completely) and incorporate #6612

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pmd-swift/src/main/java/net/sourceforge/pmd/lang/swift/ast/SwiftNameDictionary.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@adangel
[swift] Fix wrong swift token
f3f7a2b
Needed for upgrading antlr, see pmd#4972 / pmd#6621
@adangel adangel mentioned this pull request May 8, 2026
[swift] Fix invalid swift token OSXApplicationExtension #6654
Merged
UncleOwen and others added 5 commits May 8, 2026 11:39
@UncleOwen @adangel
Bump antlr from 4.9.3 to 4.13.2
6c973d3
@adangel
Merge remote-tracking branch 'origin/dependabot/maven/io.github.apex-…
981d2e2
…dev-tools-apex-parser-5.0.0' into pr-6621
@adangel
Merge branch 'main' into pr-6621
de78671
@adangel
Merge branch 'chore-fix-swift-token' into pr-6621
52a8bf6
@adangel
[doc] Update release notes (pmd#4972, pmd#6621, pmd#6654)
d4b7d81
@adangel adangel added this to the 7.25.0 milestone May 8, 2026
@adangel adangel changed the title [chore][apex][swift] Fix #4972: Update antlr from 4.9.3 to 4.13.2 [core] Fix #4972: Update antlr from 4.9.3 to 4.13.2 May 8, 2026
@adangel
adangel force-pushed the issue-4972-update-antlr branch from 1307e2b to d4b7d81 Compare May 8, 2026 09:53
@adangel
adangel merged commit f657de2 into pmd:main May 8, 2026
11 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@UncleOwen
UncleOwen deleted the issue-4972-update-antlr branch May 8, 2026 13:17
@adangel adangel changed the title [core] Fix #4972: Update antlr from 4.9.3 to 4.13.2 [core] Fix #4972: Update ANTLR from 4.9.3 to 4.13.2 May 15, 2026
@adangel adangel mentioned this pull request May 15, 2026
[doc] Fix capitalization of ANTLR in release notes #6658
Merged
2 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@adangel adangel adangel left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Milestone

7.25.0

Development

Successfully merging this pull request may close these issues.

[core] Update ANTLR to 4.13.2

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@UncleOwen @adangel
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.