[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: luaproc thought
- From: steve donovan <steve.j.donovan@...>
- Date: Wed, 30 Sep 2009 13:06:41 +0200
On Wed, Sep 30, 2009 at 12:46 PM, David Given <email@example.com> 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 (http://lua-users.org/wiki/LuaMacros)
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.