Cpp ANTLRFileStream hides and ignores file failures
- Dominant language
- Java
- Stars
- 19k
- Forks
- 3.5k
- PR merge metrics
- No merged PRs in 30d
Description
Cpp ANTLRFileStream provides no way for a caller to see failures caused by file open errors or file read errors, and it ignores such errors. This seems like a design flaw, since the equivalent Java classes would seem to throw exceptions under these error conditions.
A workaround is to open a std::ifstream, verify that it's good, then pass it to the ANTLRInputStream constructor, and then perhaps check it again afterwards, but then this begs the question of why ANTLRFileStream exists.
Contributor guide
Research direction
Start with the Cpp ANTLRFileStream and ANTLRInputStream entry points, then compare their failure behavior with the equivalent Java classes mentioned in the issue. Done means callers can observe file-open and file-read failures instead of having them ignored, while preserving the stated stream use case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100