Can't find rule grammarSpec or tree structure error while using direct left recursion
Open
comp:tool
type:bug
- Dominant language
- Java
- Stars
- 19k
- Forks
- 3.5k
- PR merge metrics
- No merged PRs in 30d
Description
A simple term rule:
```
term[int priority]
: simpleTerm
| term[$priority - 1]
;
```
will throw cannot find rule grammarSpec error. Removing the direct left recursion removes the error.
Contributor guide
Research direction
Start by reproducing the grammar shown in the issue and capture the full “cannot find rule grammarSpec” or tree-structure error. Trace how ANTLR handles direct left recursion with the parameterized term rule; done means the grammar is processed without that error and the existing behavior remains valid.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100