lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Thu, Feb 5, 2009 at 9:39 AM, Tony Finch <> wrote:
> On Wed, 4 Feb 2009, Rene Rebe wrote:
>> this simple two-liner allows for binary coded literal constants
>> in the lexxer.
> 0b is not supported by many versions of strtol().

It appears the patch doesn't pass the "0b" prefix to strtol(), it
strips it, and requests base conversion using the last argument to

I like it, its nice for bit fields, and it would be nice to have a %b
string.format specifier, too.

Don't know if it effects backwards compatibility. Because 0b used to
be illegal, it doesn't change the meaning of legal programs. Unless
code is relying on 0b being an invalid prefix...