[Mapcss] URL specifiers
tom.davie at gmail.com
Sun Mar 20 11:54:35 GMT 2011
I just noticed that the MapCSS 0.2 wiki seems to state that properties specified by URLs should take this form:
I'd like to propose changing to this instead:
For two reasons:
1) It agrees with the CSS spec.
2) It's much easier to parse. Under the old scheme, either the tokeniser would output something like <identifier 'url'> <symbol '/'> <identifier 'goes'> <symbol '/'> <identifier 'here'> <symbol '.'> <identifier 'png'>, and the parser would have to have a magic rule along the lines of "consume everything up to the <symbol ';'> and smush it together into a string"; or the tokeniser would have to be aware of the state of the parser, and produce a <string 'url/goes/here.png'> token instead of the above iff the parser is in this state. Both these solutions seem comparatively ugly, compared to the CSS solution, which allows for a simple BNF rule:
<url> ::= "url" "(" <quotedString> ")"
Would appreciate any comments.
More information about the Mapcss