Re: CSS parser recovery

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

-David

-- 
L. David Baron        <URL: http://www.people.fas.harvard.edu/~dbaron/ >

Received on Friday, 13 December 2002 14:59:01 UTC