Re: Quote marks allowed unmatched in core grammar (CSS2)

On Wednesday 2002-11-06 18:40 -0500, Etan Wexler wrote:
> I assume that the intent was not to allow such usage.  To prohibit such
> usage, we should add token types for quote marks so that unmatched quote
> marks do not return a 'DELIM' token.

This change is already in the CSS2 errata:

However, it introduces a bit of a mess, since (a) it introduces the
possibility of untokenizable input streams and (b) strings also aren't
allowed to contain newlines.  A solution to (a) would be to say that
untokenizable input streams should be handled by using the maximum
tokenizable initial segment of the input stream.  However, this would be
inappropriate because of (b), since it would mean that a string
containing a newline would cause the entire rest of the stylesheet to be
ignored.  I'm a bit confused by the results on existing implementations
of the tests that I wrote a few weeks ago [1] to test this behavior,
although I haven't had time to analyze them closely or add additional
test variants.

(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.)



L. David Baron        <URL: >

Received on Wednesday, 6 November 2002 19:13:23 UTC