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

ABNF: comments #11

Open
mnot opened this issue Jan 17, 2019 · 1 comment
Open

ABNF: comments #11

mnot opened this issue Jan 17, 2019 · 1 comment
Labels

Comments

@mnot
Copy link

mnot commented Jan 17, 2019

ABNF allows comments using ; as a delimiter to signal a comment to the end of the line.

This seems to be supported inline in a rule; e.g., this works:

foorule = bar  ; this is a comment
        / baz

but if the comment is on the last line of a rule, it will fail; e.g., either of these forms:

foorule = bar ; this is a comment

foorule = bar ; this is a comment
        / baz ; more commenting
@katef
Copy link
Owner

katef commented Jan 19, 2019

This is because $sep isn't being produced for the double newline, because the comment zone swallows its newline character. I think it'd be best to try to reimplement the whitespace handling, and hopefully get rid of the need for a double newline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants