Re: [css-syntax] string to number feedback

Thanks Simon,

I'll have a look at the test suite later on and see if I can easily re-use
it.

Marc


On Mon, Jul 1, 2013 at 8:34 AM, Simon Sapin <simon.sapin@exyr.org> wrote:

> Le 30/06/2013 21:56, Marc O'Morain a écrit :
>
>  Hi there,
>>
>> I have been implementing a parser for the CSS spec at
>> http://dev.w3.org/csswg/css-**syntax/<http://dev.w3.org/csswg/css-syntax/>and I have noticed 2 problems. I'm
>> not sure if this is the correct place to report issues – if not, please
>> let me know where I should send my comments.
>>
>
> Hi Marc,
>
> This is the right place, thanks for the bug report.
>
>
>   > 4.3.12 Consume a number
>>  >
>>  > 5. If the next 2 input characters are U+0045 LATIN CAPITAL LETTER E
>> (E) or U+0065 LATIN SMALL LETTER E (e) followed by a digit, then:
>>
>>
>> This section omits the possibility of having a + or - minus before the
>> exponent when tokenising....
>>
>
> Fixed.
>
>
>
>   > 4.3.13 Convert a string to a number
>>  >
>>  > 7.  An exponent: zero or more digits. If there is at least one digit,
>> let i be the number formed by interpreting the digits as a base-10
>> integer; otherwise, let i be the number 0.
>>  > Return the number s·(i + f·10-d)·10te.
>>
>> In point 7 above I think it should read "let e be the number" in both
>> cases, rather than 'i'.
>>
>
> Fixed.
>
>
>
>  I have a unit test test that exposes the issue here:
>> https://github.com/**marcomorain/crush/blob/**1848fef/test/main.c#L84<https://github.com/marcomorain/crush/blob/1848fef/test/main.c#L84>
>>
>
> I’ve been writing tests for css-syntax in JSON format in order to use them
> in multiple implementations. Hopefully they can also be useful to you:
>
> https://github.com/SimonSapin/**tinycss2/tree/master/tinycss2/**tests<https://github.com/SimonSapin/tinycss2/tree/master/tinycss2/tests>
>
> Let me know if you use them, I might split them into their own repository
> later.
>
> Cheers,
> --
> Simon Sapin
>



-- 
Marc O'Morain
http://marcomorain.com

Received on Monday, 1 July 2013 07:51:24 UTC