lua-users home
lua-l archive

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

On Wed, Sep 30, 2009 at 12:46 PM, David Given <> wrote:
> Metalua might be a bit heavyweight for just this, though --- I have
> vague recollections that there's a more lightweight form of syntax
> extension available, but can't for the life of me remember what it is.

Well, one option is simple lexical macros (

The advantage of this that the macro substitution takes place as an
extension of the usual Lua lexical analysis, so no separate
preprocess/compile step is required. The two disadvantages are (1)
does require lhf's token filter patch to Lua and (2) lexical
substitution is often too stupid.

But clever enough for this, I'd wager.

steve d.