lua-users home
lua-l archive

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

MTR> On Thu, 2006-26-01 at 10:11 +0000, Lisa Parratt wrote:
>> Strikes me that what people are *really* screaming for at the moment is 
>> some kind of hygienic macro system so they can redefine Lua's syntax ;)

MTR> I like syntax-extending languages, actually.  (Lua is almost there --
MTR> almost.)  

I have written a scheme inspired macro system for lua, using lhf's
token filter. It is not hygienic, and does not allow for some of
the things some people ask for, like changing the textual represen-
tation of tokens (though the latter could easily be achieved... I just
don't allow it >;-) but it can be used to add new syntaxtic
structures. I have used it to create try...catch blocks, and some
other stuff. It also comes with a syntax for creating macros, which I
think is pretty neat :-) 

I am currently rewriting it to add a few features such as optional and
repeating stuff, and the ability to be chained with other token
filters. It does already work with lua 5.1, using a dodgy patch to the
token filter code, which is definitely not fit for public consumption.
However, lhf mentioned that he will port it to 5.1, my macro system
will follow some time after that.