Open Dwarfley opened 1 month ago
This issue needs a decision from the team responsible for that area. They have been informed. Response time may vary.
A potentially related issue:
This is a valid issue, and I believe the same as #24452, however I'm not sure if the problem is in the Gradle plugin or ANTLR itself. We're not looking at this area currently, so there is no estimate on when we will investigate it.
Current Behavior
My project uses the antlr gradle plugin. The grammar are stored in separate lexer/parser files with the parser grammar using the
tokenVocab
option to locate the tokens. These grammar files are located in a package folder structure such assrc/main/antlr/org/example/antlr/
. When building the project it fails with the following error message.Expected Behavior
I expected the plugin to find the tokens generated by the lexer grammar and not fail with an error.
Context (optional)
The plugin works when both lexer and parser grammar is placed in the same file. The separate grammar files do not. I don't know if this is supposed to work but prevented by a bug or simply a limitation of the plugin. The documentation for the antlr plugin doesn't specify either case. Having the option of separating lexer/parser grammar would be helpful when dealing with complex grammar. If this is a limitation of the plugin it should perhaps be stated in the docs.
Steps to Reproduce
A minimal reproducible example containing test grammar in separate files. The package used is
org.example.antlr
. No java code is provided as the problem relates to the antlr plugin. The wrapper version is also 8.9.test.zip
Gradle version
8.9
Build scan URL (optional)
No response
Your Environment (optional)
Antlr version: 4.13.1 Java version: 21.0.1 2023-10-17 LTS OS: Windows 10