lua-users home
lua-l archive

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


Thanks Luiz, that's exactly what I was looking for. A quick comparison, hopefully this is not too far off the mark: 
  1. llex+proxy patch (http://lua-users.org/lists/lua-l/2010-11/msg00808.html
    • very small footprint (change and speed)
    • but requires patching the Lua lexer (C)
    • works with both Lua 5.1 and 5.2
    • further token extensions would require further patch to lexer
    • precludes LuaMacro
    • could coexist with MetaLua
    • Lua script compiled with patched Lua should run in non-patched Lua
  2. LuaMacro: 
    • requires (your) tokenf patch to Lua source, tested only for Lua 5.1
    • medium footprint, involves approx 1000 lines of Lua code
    • further token extensions only require extra Lua code
    • requires macro module and macro defs to be loaded by interpreter prior to script (-l switch)
    • Lua script compiled with patched Lua should run in non-patched Lua
    • no maintenance in 2 years (maybe good enough as is)
  3. MetaLua:
    • pure Lua 5.1
    • large footprint (size and likely but not checked, compile speed), approx 5000 lines of Lua code
    • run via batch file
    • further token extensions only require extra (meta)Lua code
    • not updated in 18 months (latest v0.5), manual still at v0.4


On Mon, Apr 8, 2013 at 10:12 PM, Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> wrote:
> what would be the simplest syntax that would involve the least modification
>
>     \(x,y) [x+a*y]
>     @(x,y) (x+a*y)
>     \\(x,y) x+a*y\\
>     [(x,y) x+a*y]

All but the last one are easily handled by token filters, especially ones
written in C. For the syntax
        \x,y (x+a*y)
see
        http://lua-users.org/lists/lua-l/2010-11/msg00808.html
        http://lua-users.org/lists/lua-l/2012-03/msg00309.html