[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: bug in lua lexer
- From: Doug Currie <doug.currie@...>
- Date: Tue, 6 Dec 2005 18:13:14 -0500
Tuesday, December 6, 2005, 5:02:24 PM, Glenn Maynard wrote:
> On Mon, Dec 05, 2005 at 01:30:38PM -0500, John Passaniti wrote:
>> Antero Vipunen wrote:
>> >Lua lexer treats dot `.' as separator. But relies (by default) on
>> >strtod() for converting, and thus if your ``local'' separator is `,',
>> >you are unable to compile the following sample program:
> I can think of four solutions, and they're all ugly:
> #1: Lua rolls its own conversion. Bloats the code, but can be omitted
> on embedded platforms where strtod() will do what's expected.
Ugh! strtod() is extremely hard to get right. It is right in glibc
because it is based on David Gay's code. Unless you have a very high
quality implementation, don't do it!