zwol ([info]zwol) wrote,
@ 2008-05-09 21:13:00
Previous Entry  Add to memories!  Tell a Friend!  Next Entry
Current mood:cranky

things i think i might be happier not knowing.

In CSS, url() is defined as part of the lexicon, not the grammar. If you write

  .x { background-image: url(  "foo/bar"  ) }

everything from the u up to the close parenthesis is ONE TOKEN. As far as I can tell, the only effect this has on anything is to make it more difficult to implement a CSS parser.



(Post a new comment)


[info]graydon
2008-05-10 02:09 am UTC (link)
"CSS: look, at least it's not as hard to parse as SGML!"

Hmm. Not really the snappy motto you'd hope for.

(Reply to this)(Thread)


[info]zwol
2008-05-10 02:50 am UTC (link)
I'm trying to decide whether there's anything that would notice if Moz implemented the parser as if the grammar was the way it shoulda been written in the first place: URI becomes a nonterminal defined as

uri : "url" '(' S* [ STRING | URILITERAL ] S* ')'


and URILITERAL is a new terminal that does the unquoted case. There might be a visible change to error recovery, I don't know. Bleah.

(Reply to this)(Parent)


Create an Account
Forgot your login?
Login w/ OpenID
English • Español • Deutsch • Русский…