lua-users home
lua-l archive

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

> being able to customise syntax by preprocessor, is very cool and very
> much needed for those need it.

Just for the record: depending on your needs, you can do your transformations
in the load function. In Lua 5.0, you must do these transformations in C
or in a separate Lua state. In Lua 5.1, you can do them in Lua itself.

So, in the load function you can take a completely different syntax and
generate the corresponding Lua code. The hard part is taking a slightly
modified Lua syntax because you then need to handle strings and comments,
and cannot rely purely on gsub and friends. Hence the idea of token filter...