Fatal grammar error handling

L. David Baron wrote to <www-style@w3.org> on 6 November 2002 in "Re: Quote
marks allowed unmatched in core grammar (CSS2)"
(<mid:20021106191319.A11111@is04.fas.harvard.edu>):

> (Someone else pointed out recently that the same problem exists for
> unparseable token streams, since the forward-compatible grammar doesn't
> parse certain things, e.g., garbage where property names go.  I think
> the solution here is a formalization of the way that the two grammars
> fit together and a relaxation of the "failure-case" grammar so that such
> things are allowed.)

I think it perfectly reasonable (indeed, desirable) to restrict what can be
considered CSS.  Some sequences of characters fail to form a Cascading
Style Sheet.  What is so terrible about that?

The sensible thing, rather than mucking about with the core grammar, is to
specify uniform error handling when the input characters fail to form a
Cascading Style Sheet.

It would not hurt to go one level below that, and to specify uniform error
handling when the input bytes fail to form characters.  Or is that more a
MIME/HTTP issue?

--
Etan Wexler <mailto:ewexler@stickdog.com>

Received on Thursday, 14 November 2002 07:10:57 UTC