lua-users home
lua-l archive

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


Roberto Ierusalimschy wrote:
It would be nice if the parser could either count the [[ and ]] balance

It does. The problem is that, in regular code, `]]' usually appears
without a corresponding `[[' (e.g., `a[b[i]]').

It occurred to me after sending that this was always the case
for me too...

or allowed a different block-comment format whose terminator sequence
wasn't valid Lua grammar.

It will. Lua 5.1 will generalize `[[ ]]' to `[*...*[ ]*...*]', so

That's great news.

that a `[*[' only closes with a `]*]' (same number of stars). That
will allow the inclusion of *any* literal string inside Lua code without
modifications.

The syntax is not very pretty, but to allow any literal string we need
variable delimiters.

That syntax does look pretty wacky, but in this case I'm
happy with whatever works. :)

Thanks,
--Adam
--
Adam D. Moss   . ,,^^   adam@gimp.org   http://www.foxbox.org/   co:3
Consume Less, Live More