Regarding expecting next grammar rules
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 19k
- Forks
- 3.5k
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I am new to writing antlr4 grammar. I have written this sentence.
gby : 'by' cn+ hvg? ;
Testing rules:
line 1:0 mismatched input '' expecting 'by'
input: by
line 1:2 missing 'CN' at ''
input: by CN
but after inputing by CN I don't get expecting "hvg" as a suggestion because of "?" sign. But I want to get suggestion for "hvg". It would be great if anyone tells me how can I get this suggestion.
Thank in advance.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the grammar rule `gby : 'by' cn+ hvg? ;` and reproduce the reported inputs `by` and `by CN`. Read the parser's handling of optional rules and expected-token error reporting; done means determining whether an `hvg` suggestion is supported and documenting the applicable behavior or change needed.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100