lua-users home
lua-l archive

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

Pavel Antokolsky aka Zigmar <zigmar <at>> writes:

> The problem problem I have with the current syntax of my test
> description, is that I have to put commas or colons after each entry,
> which seems to be the main source of syntax errors, because they are
> often forgotten. I'm seeking the way to make them optional, to make
> user's  Is this involves modifying lua parser or there some other ways
> to achieve the effect? If yes, would it be difficult (I've never
> before modified Lua parser)?


There is a patch "Enhanced table constructors" that does this type of thing (see  Though this patch is for Lua 4.0,
it involves only about two dozen lines, so it might not be difficult to patch
the latest Lua accordingly.

I've wanted this type of thing too, so it may be a common desire, but I also
wasn't sure it was worth going non-standard.  If you need additional help, let
me know, and please release any patch you make for others interested.

best regards--davidm