Re: Error Parsing

On Sat, 23 Oct 2004, Ian Hickson wrote:
> > 
> > Which in turn is because the grammar requires properly nested and 
> > closed structures, but the obvious intention is that rules be actioned 
> > as soon as they have been completely read.
> 
> Right -- it's definitely intended for CSS to be parsable with no more 
> than one character look-ahead, so anything that implies otherwise is 
> most probably incorrect.

Er, actually dbaron just pointed out to me that that's not quite true; 
with namespaced attribute selectors you have to do two-character lookahead 
to determine if it is a namespace prefix for an attribute name, or an 
attribute name for a dash-match selector.

   [foo|=bar]
   [foo|bar|=baz]

So it is really more like one-token lookahead, treating /* and */ as 
separate tokens. Except that's not what the grammar says... Ahem.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Saturday, 23 October 2004 18:05:32 UTC