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

The ns-reserved-directive production consumes comments #298

Open
Thom1729 opened this issue Mar 5, 2023 · 0 comments
Open

The ns-reserved-directive production consumes comments #298

Thom1729 opened this issue Mar 5, 2023 · 0 comments

Comments

@Thom1729
Copy link
Collaborator

Thom1729 commented Mar 5, 2023

Because ns-directive-parameter is defined as simply ns-char+, it will happily consume comments at the end of the line. E.g, in:

%FOO bar # baz

The ns-reserved-directive production will match all of FOO bar # baz. This is probably not the intent.

The practical implications of this are almost nil, since the parsing process should discard both comments and (with a warning) reserved directives. But it could also be easily fixed by redefining ns-directive-parameter to [ lookahead ≠ '#' ] ns-char+.

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

No branches or pull requests

1 participant