[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: syntax heresy
- From: Klaus Ripke <paul-lua@...>
- Date: Tue, 9 Aug 2005 14:11:57 +0200
On Tue, Aug 09, 2005 at 02:42:59PM +0300, Boyko Bantchev wrote:
> Diego Nehab mentioned here that a macroprocessor is on the
> way, and there is intention to do even more work towards
> syntax customization. In this respect, could Lua be used as a
> preprocessor to itself?
sure it can, and IIRC there are projects doing this.
To make this work regardless of how code makes it's way to the
compiler, hook up to lua_load or the lzio stuff (in 5.0.2).
For most applications it should suffice to run mylang.lua
with scriptname.mylang as arg and in mylang either bypass
the require-module mechanism altogether or pimp it up
using some of the fallback mechanism discussed recently.
Do not expect this to become the default behaviour of
the lua binary as shipped. It's just too easy to make a
> But these days preprocessors seem not to be in fashion.
As most luas are running as part of some application anyway,
it is quite fashionable to customize lua to any personal taste
and generate lua code on or the other way.