Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Peggy can't parse superfluous semicolons #346

Closed
gamesaucer opened this issue Feb 22, 2023 · 3 comments · Fixed by #366
Closed

Peggy can't parse superfluous semicolons #346

gamesaucer opened this issue Feb 22, 2023 · 3 comments · Fixed by #366
Assignees
Labels
blocks-release Blocks an imminent release. High Priorty.

Comments

@gamesaucer
Copy link

Steps to reproduce: Parse the following grammar:

Start = Part*; ;
Part = .

Expected result: It is a valid Peggy grammar, since the separation of its rules is not ambiguous.
Actual result: It is not a valid Peggy grammar.

This happens because Peggy does not accept duplicated semicolons. I suppose not fixing this could be justified with the reasoning that duplicated semicolons are almost certainly a mistake on the part of the programmer, but I wanted to at least point out this limitation.

@hildjj
Copy link
Contributor

hildjj commented Feb 22, 2023

This one I might be open to changing. However, I want to make sure I can capture the extra semis in peggy-eslint-parser first. Will leave this open to discussion.

@hildjj
Copy link
Contributor

hildjj commented Mar 3, 2023

After looking at peggy-eslint-parser, this is still an easy fix. Including in v3.0.1.

@hildjj hildjj self-assigned this Mar 3, 2023
@hildjj hildjj added the blocks-release Blocks an imminent release. High Priorty. label Mar 3, 2023
@reverofevil
Copy link

Thanks for pointing this out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocks-release Blocks an imminent release. High Priorty.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants