Re: [CSS21] last edition: pity

On Tue, 5 May 2009, Giovanni Campagna wrote:

> 2009/5/5 Andrey Mikhalev <amikhal@abisoft.spb.ru>:
>>
>> 1. Appendix G. Grammar of CSS 2.1,
>> š G.2 Lexical scanner,
>> š following production was removed:
>> š š {s}+\/\*[^*]*\*+([^/*][^*]*\*+)*\/ {unput(' '); /*replace by space*/}
>>
>> š production essential for selector parsing: without it selectors like
>> š 'A /**/>B'
>> š became invalid (token sequence is "ident,s,greater,ident" instead of
>> š "ident,greater,ident")
>
> I think the error is in the definition of "selector" that does not
> allow space tokens before the combinators, assuming that space is
> inside the GREATER token.

i think - in any case - tokenizer should be adequate to grammar.
hence, either:
- restore 'unput' production in tokenizer
- rewrite grammar as LL(2), allow space before combinator 
imo, first is better.

>
>> 2. 4 Syntax and basic data types,
>> š 4.2 Rules for handling parsing errors,
>> š Invalid at-keywords:
>> š š User agents must ignore an invalid at-keyword together with
>> š š everything following it, up to and including ...
>> š following sentence added:
>> š š the end of the block (}) that contains the invalid at-keyword
>>
>> š what you are talking about? _ignore_ _end of the block_?!!
>
> Change "up to and including the next semicolon (;), the next block
> ({...}), or the end of the block (}) that contains the invalid
> at-keyword" with "up to and including the next semicolon (;) or the
> next block ({...}), or up to but non including the end of the block
> (}) that contains the invalid at-keyword"

OK. reasonable, then.

>> 3. 4 Syntax and basic data types,
>> š 4.2 Rules for handling parsing errors,
>> š following paragraph added:
>> š š Malformed statements.
>> š š User agents must handle unexpected tokens encountered while parsing
>> š š a statement by reading until the end of the statement, while
>> š š observing the rules for matching pairs of (), [], {}, "", and '',
>> š š and correctly handling escapes.
>> š š ...
>>
>> š most evil idea, violate nearly everything in chapter 4, starting
>> š from formal core syntax.
>> š in short:
>> š š 'unexpected token' in 'statement' cannot occur - since 'statement'
>> š š is not a checkpoint (not a Real Thing, precisely).
>> š š handling of parsing errors differs for selectors / declarations /
>> š š at-rules.
>> š š paragraph above redundant and introduce conflict with them.
>
> A declaration is not a statement. The error handling is the same for
> rulesets and at-rules, the difference is only that ";" close at-rules.
> To make it clearer we could write "User agents must handle unexpected
> tokens encountered while parsing a statement by ignoring up to and
> including the next block (or ; if the statement is an at-rule), while
> observing the rules for matching pairs of (), [], {}, "", and '', and
> correctly handling escapes".

as i said, error handling is right opposite.
unexpected token in selector invalidate statement.
unexpected token in declaration invalidate only declaration.
from now, try to write down tokens which are 'unexpected in statement',
and you got the picture.

futuremore, sentence violate following:
4.1.6
A block starts with a left curly brace ({) and ends with the matching 
right curly brace (}). In between there may be any tokens, except that 
parentheses (( )), brackets ([ ]) and braces ({ }) must always occur in 
matching pairs and may be nested
4.1.7
The selector (see also the section on selectors) consists of everything up 
to (but not including) the first left curly brace ({)

note last sentence does not enforce 'matching pairs', and, in fact, is 
prose replacemnent for
error '{'
parser directive.

worth all above formal objection?

>
>> 4. 15 Fonts,
>> š 15.6 Font boldness : the 'font-weight' property:
>> š š 'bolder' selects the next weight that is assigned to a font that is
>> š š darker than the inherited one.
>> š following sentence removed:
>> š š If there is no such weight, it simply results in the next darker
>> š š numerical value (and the font remains unchanged), unless the
>> š š inherited value was '900' in which case the resulting weight is also
>> š š '900'.
>> š [similar in 'lighter']
>> š following paragraph added:
>> š š Note: A set of nested elements that mix 'bolder' and 'lighter' will
>> š š give unpredictable results depending on the UA, OS, and font
>> š š availability. This behavior will be more precisely defined in CSS3.
>
> It seems that this is to avoid backward compatibility problems when
> CSS3 Fonts will be published, which currently says that synthetic bold
> faces have problems with bolder/ligther. Actually, I cannot understand
> what problems, I'd like to hear from implementors.

well, i am an implementor :)

Received on Tuesday, 5 May 2009 13:23:18 UTC