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

Replace "parse error" with "parse violation" #60

Closed
sideshowbarker opened this issue Aug 11, 2015 · 6 comments
Closed

Replace "parse error" with "parse violation" #60

sideshowbarker opened this issue Aug 11, 2015 · 6 comments

Comments

@sideshowbarker
Copy link
Contributor

The spec should replace https://url.spec.whatwg.org/#parse-error with parse violation.

parse error is an ambiguous and misleading term. See #59 (comment) for background.

@hillbrad
Copy link

Perhaps just adding "and continue" or some other language to indicate that the algorithm "falls through" such a condition would be a more important clarification.

@annevk
Copy link
Member

annevk commented Aug 14, 2015

I'm a bit stuck on how to satisfy @hillbrad's comment since we have many instances where we require that something is done, but don't want things to end. If we make it "report a syntax error" would that make it clearer that it doesn't terminate the parse operation? Note that the definition for parse error is clear on this already.

@hillbrad
Copy link

I see the difficulty here. I wonder if there is room to introduce a
distinction between a "warning" and an "error"? I tend to think of a
warning as something that may / should be reported but which doesn't cause
termination, whereas an error has stronger connotations of being unable to
recover or continue an algorithm. Not all that important at the end of the
day, I should have been a more careful and complete reader.

On Fri, Aug 14, 2015 at 4:45 AM Anne van Kesteren notifications@github.com
wrote:

I'm a bit stuck on how to satisfy @hillbrad https://github.com/hillbrad's
comment since we have many instances where we require that something is
done, but don't want things to end. If we make it "report a syntax error"
would that make it clearer that it doesn't terminate the parse operation?
Note that the definition for parse error is clear on this already.


Reply to this email directly or view it on GitHub
#60 (comment).

@annevk
Copy link
Member

annevk commented Aug 14, 2015

Yeah, I think that's why @sideshowbarker suggested "violation". It's not clear to me that "warning" is strong enough since you are actually in error, at least, to the extent we keep caring about conformance.

@annevk annevk closed this as completed in 3651453 Aug 15, 2015
@sideshowbarker
Copy link
Contributor Author

I think syntax violation is perfect in the context of the URL spec but I think optimally it would be good to have the same term for this “parse error” stuff across all specs, including the HTML spec. But in the HTML spec, since the treebuilder part (not just the tokenizer) also contains “parse error” cases, syntax violation may not be accurate for in all those cases.

But I guess we can worry about what to change it to in the HTML spec if/when we ever actually get there.

@annevk
Copy link
Member

annevk commented Aug 16, 2015

Yeah, I wonder what errors there would not be syntax violations, but I agree that if we find we need a different term we should revisit this.

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

No branches or pull requests

3 participants