[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Standard Libraries:
- From: David Given <dg@...>
- Date: Mon, 21 Dec 2009 09:14:28 +0000
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 21/12/09 08:39, steve donovan wrote:
[...]
> If we get a agreed-upon, standard token-filter mechanism for vanilla
> Lua, then of course it would be easy to implement lhf's suggested
> lambda notation \x,y(x+y) That would make the shortists happy, and
> the longists can just avoid the extension.
I should point out that Lua-to-Lua translation works really well and is
actually quite easy. Check out lexer.lua and parser.lua here:
http://olua.git.sourceforge.net/git/gitweb.cgi?p=olua/olua;a=tree;f=olua;h=0f0da4a15b54b36bea8e11751e81c53c6d1652e0;hb=HEAD
It's all interfaced through a custom package loader, which allows .olua
files to be loaded through require in exactly the same way as .lua
files. As more work's being done it makes load time slower, of course,
but it's nothing that anyone would ever notice.
There is an annoying limitation that the main program *itself* can't use
syntax extensions implemented in this way --- because the thing that
loads the package loader wasn't loaded *with* the package loader --- but
it may be possible to work around this using the -l command line
argument. I haven't tried that yet.
- --
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│
│ "Under communism, man exploits man. Under capitalism, it's just the
│ opposite." --- John Kenneth Galbrith
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iD8DBQFLLzxzf9E0noFvlzgRAjXGAJ9HtyOwZscNFHEWusfriC6FtL2pMwCdH2tb
1LKaqbMvzccvL5IeapzdE40=
=0Wil
-----END PGP SIGNATURE-----
- References:
- Standard Libraries: (was: and Lua marches on), steve donovan
- Re: Standard Libraries: (was: and Lua marches on), Luiz Henrique de Figueiredo
- Re: Standard Libraries: (was: and Lua marches on), steve donovan
- Re: Standard Libraries: (was: and Lua marches on), steve donovan
- Re: Standard Libraries: (was: and Lua marches on), Tony Finch
- Re: Standard Libraries: (was: and Lua marches on), Fabien
- Re: Standard Libraries: (was: and Lua marches on), steve donovan
- Re: Standard Libraries: (was: and Lua marches on), steve donovan
- Re: Standard Libraries: (was: and Lua marches on), steve donovan
- Re: Standard Libraries: (was: and Lua marches on), Fabien
- Re: Standard Libraries: (was: and Lua marches on), steve donovan