-
Notifications
You must be signed in to change notification settings - Fork 22
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
make production ending semicolon optional #14
Comments
Yeah I've been thinking about this one too. Thanks for raising it. |
One note, I'd like it if we didn't require a newline either so breaking up long productions or expressions across lines wouldn't prohibit parsing. |
Not requiring the newline seems trickier to me, but sounds like you have an idea. How would that work? |
@CrockAgile I've got a lot of faith in what we can get out of |
@Snewt that seems reasonable to me. I still need to brush up on nom to know how it handles forward peeking, but you are probably right it is doable. I would guess it would improve usability with negligible impact on performance or code readability |
@Snewt Would it be too slick/hacky to sidestep this issue by honoring BNF comments? If BNF comments are from |
@CrockAgile I'm not sure that would really sidestep the issue as it stands. It could be that we add support for |
@Snewt Sounds good! I think I got confused anyway by glancing at the algol example in the history section on the wiki. |
Maint/issue 14 end production closes #14
closed by 21338d3 |
Maint/issue 14 end production closes #14
Plenty of BNF examples, including the wikipedia example, do not require productions to terminate with a semicolon, but rather only require a newline. I believe the parser could be updated to optionally use the ending semicolon, which would support both formats.
The text was updated successfully, but these errors were encountered: