RE: [CSS21] last edition: pity

On Tue, 5 May 2009, Sylvain Galineau wrote:

>  Feedback on spec changes is always very welcome, but calling them 
> 'trash', 'nonsense' and such is neither strictly necessary nor a 
> productive way to engage the editors and the larger group. Thanks.

mea culpa. poor english knowledge. apologise.

> First, I suggest reading on the background of this change: 
> http://wiki.csswg.org/spec/css2.1#issue-24

solution looks much worse than original issue. for me.

>
> Second, as Giovanni points out, a declaration is not a statement.
>
> Maybe an example would help explain how you're reading the rule i.e. if 
> there is a contradiction, something that used to be invalid may now be 
> valid or ambiguous ?

not example, but here is some explanation:

"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."

issue#1:
   parser has no real 'statement' state, it's artifical construction
   (statement : ruleset | at-rule; s.a. 4.1.4)
   from grammar point of view, any token is 'expected' in statement.

   what is 'handle unexpected tokens while parsing a statement' then?

issue#2:
   (btw, as consequence) what is 'end of the statement'?

   undefined thing. how i can use it in error recovery?

issue#3:
   as soon as terminal token arrives, parser switches into
   selector / declaration / at-rule state.
   error handling for declaration and at-rule state already defined
   in 4.2, error handling for selectors already defined in 4.1.7.

   this makes introduced paragraph at least redundant.

issue#4:
   according 4.1.7 (and formal syntax), first curly brace ({) denote
   end of selector, and only then matching pairs rule take effect
   according 4.1.6.

   but selector state is also 'statement' state, hence according
   to new paragaph i should 'reading until the end of the statement,
   while observing the rules for matching pairs' regardless of
   selector/block state.

   2 different algorithms specified. contradiction#1.

issue#5:
   'User agents must handle unexpected tokens encountered while parsing
    a declaration by reading until the end of the declaration'

   but while i parse declaration i also parse statement.

   'User agents must handle unexpected tokens encountered while parsing
    a statement by reading until the end of the statement'

   2 different algorithms specified. contradiction#2.

issue#6:
   'Something inside an at-rule that is ignored because it is invalid,
   such as an invalid declaration within an @media-rule, does not make
   the entire at-rule invalid.'

   the same. at-rule is statement.

>
>

Received on Wednesday, 6 May 2009 10:35:16 UTC