lua-users home
lua-l archive

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

Here are cases where Lua behavior is a certain bug:
The expressions are pretty clear and should be valid.

On 07.02.2010 10:17, Gé Weijers wrote:
On Sat, 2010-02-06 at 23:51 +0800, KHMan wrote:
And can the above be parsed as valid Lua syntax in any way?

Of course not, but it's still strange that this whole construct is fed
into a conversion routine as a single 'number'.

My contention is that a sequence like "1...e" should ideally be parsed
as "1. .. e", which is perfectly valid Lua. The lexer currently groups
"1...e" together as a "number" and concludes it's invalid because strtod
or a similar conversion routine does not like it.

If you build a lexical scanner the textbook way, using an FSA the
resulting scanner would not do this. It's not a big issue, but if you,
like the original poster, need to parse Lua without using the
parsing routines you end up scratching your head.



Best regards,
Sergey Rozhenko