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

Java/ANTLR: example C fails to build with Java 20 due to case mismatch #455

Closed
andreasabel opened this issue Jul 26, 2023 · 0 comments
Closed

Comments

@andreasabel
Copy link
Member

ANTLR/Java does not deal well with a parser name cParser because with Java 20 cParserListerner becomes an unbound symbol.
The lower case c is due to the package name sanitization introduced in:

So this problem exists since 2.8.4, but many only surfaced with recent Java versions that are more strict with case.

A solution is to use a capitial CamelCase for the prefix of Parser and Lexer, but keep the snake_case for the package name.

@andreasabel andreasabel added this to the 2.9.5 milestone Jul 26, 2023
@andreasabel andreasabel self-assigned this Jul 26, 2023
andreasabel added a commit that referenced this issue Jul 26, 2023
Triggered by `example/C.cf`.

ANTLR/Java does not deal well with a parser name `cParser` because with Java 20 `cParserListerner` becomes an unbound symbol.
The lower case `c` is due to the package name sanitization introduced in:
- #212

So this problem exists since 2.8.4, but many only surfaced with recent Java versions that are more strict with case.

A solution is to use a capitial CamelCase for the prefix of `Parser` and `Lexer`, but keep the snake_case for the package name.
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