W3C home > Mailing lists > Public > www-style@w3.org > December 2002

Re: CSS parser recovery

From: L. David Baron <dbaron@fas.harvard.edu>
Date: Fri, 13 Dec 2002 14:58:56 -0500
To: www-style@w3.org
Message-ID: <20021213145856.A24422@is03.fas.harvard.edu>

On Friday 2002-12-13 19:00 +0000, Ian Hickson wrote:
> On Fri, 13 Dec 2002, REFSTRUP,JACOB (HP-Vancouver,ex1) wrote:
> >
> > p {color: green; /* missing "}" */
> > q {color: blue;}
> > samp {color:red;}
> That should parse as something like (froom memory):

It doesn't parse, since there's no ending brace to match the beginning
brace on the first line.  (The maximum initial sequence of tokens that
parses according to the forward compatible grammar is the empty
sequence.  Not that CSS2 actually defines what to do in such a case.)

(That is, however, how it would parse if you're allowed to parse only
parts of productions if they're interrupted by the end of a stylesheet.
But CSS2 doesn't allow that, does it?)

See also http://lists.w3.org/Archives/Public/www-style/2002Nov/0014.html


L. David Baron        <URL: http://www.people.fas.harvard.edu/~dbaron/ >
Received on Friday, 13 December 2002 14:59:01 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:04 UTC