[css-syntax] problem with parse rule (was: problem with parse component value)

Am 04.03.2014 21:37, schrieb Tab Atkins Jr.:
> On Tue, Mar 4, 2014 at 12:29 PM, Johannes Koch <koch@w3development.de> wrote:
>> I think there is a problem with parsing a component value (5.3.6) in the CR.
>>
>> 4. Reconsume the current input token. Consume a component value and let
>> value be the return value. If nothing is returned, return a syntax error.
>>
>> 5. While the current input token is a <whitespace-token>, consume the next
>> input token.
>>
>> 6. If the current input token is an <EOF-token>, return value. Otherwise,
>> return a syntax error.
>>
>> We need to consume the next input token before step 5. Otherwise at step 5,
>> the current input token is the last token of the component value consumed by
>> 5.4.6. and cannot be either whitespace or EOF.
>
> Ooh, very good catch.  Fixed.  (Rather than consuming the next token
> eagerly, I just changed the condition to look at the next input
> token.)

There's a similar issue in 5.3.3. Parse a rule

3. If the current input token is an <EOF-token>, return a syntax error.

    Otherwise, if the current input token is an <at-keyword-token>,
    consume an at-rule and let rule be the return value.

    Otherwise, consume a qualified rule and let rule be the return
    value. If nothing was returned, return a syntax error.

4. While the current input token is a <whitespace-token>, consume the
    next input token.

At step 4 the current input token is the last token consumed by 5.4.2. 
or 5.4.3. ('}' or ';') and cannot be either whitespace or EOF.

-- 
Johannes Koch
In te domine speravi; non confundar in aeternum.
                             (Te Deum, 4th cent.)

Received on Tuesday, 4 March 2014 21:27:35 UTC