antlr / antlr/antlr4

Check template use of currentRule.args

Open
#654 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
19k
Forks
3.5k
PR merge metrics
No merged PRs in 30d

Description

I believe the reference to currentRule.args on the following line should actually be just args.

https://github.com/antlr/antlr4/blob/5bd415b19526aea8719eeaf6e1cb8e0174ec9b9f/tool/resources/org/antlr/v4/tool/templates/codegen/Java/Java.stg#L346

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open tool/resources/org/antlr/v4/tool/templates/codegen/Java/Java.stg at line 346 and inspect how currentRule.args and args are defined and used in the surrounding template. Verify the generated Java output for a grammar uses the intended argument reference and that the reported currentRule.args reference is gone.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
compilers
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.