getTokens not inclusive in Python3 runtime
- Dominant language
- Java
- Stars
- 19k
- Forks
- 3.5k
- PR merge metrics
- No merged PRs in 30d
Description
The function getTokens in the class BufferedTokenStream found in the Python3 runtime is supposed to be inclusive but isn't. Here is the link to the [line](https://github.com/antlr/antlr4/blame/master/runtime/Python3/src/antlr4/BufferedTokenStream.py#L140). Compare to this [line in the Java runtime](https://github.com/antlr/antlr4/blob/master/runtime/Java/src/org/antlr/v4/runtime/BufferedTokenStream.java#L288).
Easy to work around but still a confusing break of convention.
Contributor guide
Research direction
Start at runtime/Python3/src/antlr4/BufferedTokenStream.py line 140 and compare getTokens with runtime/Java/src/org/antlr/v4/runtime/BufferedTokenStream.java line 288. Verify the Python runtime's range behavior against the Java implementation and add coverage showing that the requested endpoints are treated inclusively.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100