[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Enterring Hex Number
- From: Ben Sunshine-Hill <sneftel@...>
- Date: Tue, 5 Jul 2005 13:33:43 -0700
Modifying the lexer is the standard method.... I think there's even a
standard patch for it, on the lua-users Wiki
(http://lua-users.org/wiki). Don't worry too much about having a
modified version if you're embedding the thing anyway. Lua is easy to
modify, and your changes are unlikely to break it in any way.
On 7/2/05, glenn-edgar@onyxengr.com <glenn-edgar@onyxengr.com> wrote:
>
> Hi everyone
>
> I have been involved recently in embedding lua in settop products for debug
> and testing purposes. Working in a hardware environment, there is the need
> to work with hex numbers. I worked around it by using helper functions, but
> it is still sort of clumsy in the user had to enter
> a= hex("0xff00ff") instead of a = 0xff 00
>
> I read previous posting an it appears that the lex part of lua could be
> extended to do that, but it would mean that I would have modified version
> away from the baseline.
>
> Any suggestions on the correct approach to handling hex numbers.
>
> Glenn Edgar
>